COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: velniaszs on 23 Dec 2013 06:07:54 AM

Title: Multidimensional Report calculations with the same measure
Post by: velniaszs on 23 Dec 2013 06:07:54 AM
Hello,
I am working on report based on the cube(see attached structure)
The cube only have 1 measure [Measure_Value].
In my crosstab next to [measure_name] set I need to have 2 calculations
For Company % calculations should be [Company Available]/[Company Delivered]
For Accuracy % ([Valid Mobile]+[Valid Email])/[Total Updated]

Should I change the cube and have 1 Measure for each Measure_Name Column or is there a way of doing these calculations with 1 measure?
Title: Re: Multidimensional Report calculations with the same measure
Post by: velniaszs on 23 Dec 2013 08:01:06 AM
Here is the example of tuple which is static
value(tuple( [Measure Value], [Email]))/
value(tuple ([Measure Value],[Total Updated]))

Is there a way of changing it to a dynamic tuple which would do something like :
value(tuple( [Measure Value], first_member_of([Measure_Name])))/
value(tuple ([Measure Value],second_member_of([Measure_Name])))
Title: Re: Multidimensional Report calculations with the same measure
Post by: navissar on 23 Dec 2013 09:52:07 AM
Hi,
You're first question is merely a matter of dividing the results of a tuple.
Your second question is more interesting.
If you have your dimension set up as one part of the crosstab, you can achieve something like this:
If you have the following crosstab:

       +Revenue|Growth
       |_____________________________________
2009|   100     |
2010|   200     |100
2011|   200     |0
2012|   250     |50

By using a calculation such as this one:
total([Revenue] within set currentMember ([great_outdoors_sales_en].[Years].[Years]))-total([Revenue] within set prevMember(currentMember ([great_outdoors_sales_en].[Years].[Years])))

It might be easier to help your precise situation if we knew what it was. Your first request requires different calculation between each set of measure types, so that's obviously not dynamic.
Also, I find it difficult to believe you set measure types up without knowing in advance what they are - what measures are displayed in a report is usually the first thing that is planned.