I have a problem with a calculation item based on the cubes in Cognos (Report Studio)
I have an metric that is formed with: METRIC = METRIC1 - METRIC2
- METRIC 1 = metric based on the prompt
- METRIC 2 = metrica based on the prompt - 12 month
How can I do to get the difference? Necessarily have to create 2 queries?
Please help me?
Can you be a little clearer on what you mean by "metric based on the prompt"? Do you mean the users can select which metric to use? Or do you mean that they are prompted for some dimensional information which is used as context for a specified measure?
Generally if you want to choose which measure to use, you can do this with a query calculation which builds up the MUN of the measure - driven by a prompt macro.
If you want to use a single measure with two different contexts, then you could use tuple() functions to get the measure value for the prompted member and the prompted member in the current year and the prompted member in the previous year.