Search code examples
ssasmdxcognos

Can i pass a parameter from a calculated member on a ssas 2008 cube to cognos report studio?


Can i pass a parameter from a calculated member on a ssas 2008 cube to cognos report studio? I know how to do this in Microsoft reporting sevices, but not Cognos Report Studio 10.1. I do not know the format the calculated member should be in, or how to get Cognos to recognize any parameters passed. Example: Say i wanted to pass the code below, that shows the top 25 accounts, but instead, i wanted to adjust it to have a variable / parameter that enabled me to adjust it at run time to say the top 10 accounts. Is this possible. I know i can create the code in report studio itself, but i would rather do it in the cube for performance and re-usability reasons. Here is a copy of this particular example and thank you!

           TOPCOUNT( [Instrument].[Account Name].[Account Name].members,
           25, [Measures].[Committed Amt])**strong text**

Solution

  • If I understood you correctly, you can do it in the following way:
    Drag a data item into the query and use the embeded parameter (?prmTopCount?):

    topeCount([Instrument].[Account Name].[Account Name], 
    ?prmTopCount?, [Measures].[Committed Amt])
    

    You can build a prompt page and define a textBox Prompt which uses existing prompt (prmTopCount).
    I have also tried to write manual MDX in the report, but it looks it does not support macros embedded inside the manual written MDX.