Topic
  • 2 replies
  • Latest Post - ‏2012-10-01T13:29:32Z by J.BJERRE
J.BJERRE
J.BJERRE
52 Posts

Pinned topic Select Measure from attribute value

‏2012-09-27T13:49:41Z |
Hi

I am strugling with dynamicly selecting a measure in a report.
I am reporting from a TM1 cube.
I have a company dimension where there is an attribute called Local Currency.
I also have a measure dimension with all the currencies.
I want to use the measure that corresponds to the attribute value.
I can easily get the attribute value in a dataitem using the rolevalue function.
I have tried to use some macro functions (prompt, sq) to get the right measure, but the all want a string or parameter input!
So how to convert a string in a dataitem to a MUN?

Any help in the right direction would be appreciated, thanks.

Regards
J.Bjerre
Updated on 2012-10-01T13:29:32Z at 2012-10-01T13:29:32Z by J.BJERRE
  • SystemAdmin
    SystemAdmin
    15496 Posts

    Re: Select Measure from attribute value

    ‏2012-09-28T01:38:44Z  
    The following information would be useful in determining the appropriate design approach:
    • A screen capture of the measures in your cube
    • A list of the Company data showing the attribute values for the currency
    • A reproduction of the final layout you require for your report (a mock-up in Excel would work well for this)

    On a side note, macros are evaluated before the query is executed so you can't pass a data item value to these expressions. One way around this is to use a master-detail relationship to pass a value from one query to another query via a parameter (prompt macro) but this is limited to a single value so you would only be able to query one company at a time (or one detail query per company).
  • J.BJERRE
    J.BJERRE
    52 Posts

    Re: Select Measure from attribute value

    ‏2012-10-01T13:29:32Z  
    The following information would be useful in determining the appropriate design approach:
    • A screen capture of the measures in your cube
    • A list of the Company data showing the attribute values for the currency
    • A reproduction of the final layout you require for your report (a mock-up in Excel would work well for this)

    On a side note, macros are evaluated before the query is executed so you can't pass a data item value to these expressions. One way around this is to use a master-detail relationship to pass a value from one query to another query via a parameter (prompt macro) but this is limited to a single value so you would only be able to query one company at a time (or one detail query per company).
    Hi Phil

    Thanks for leading me in the right direction.
    creating a master-detail relationship to pass the attribute value from one query to another query and using a prompt macro solved my problem.

    Regards
    J.Bjerre