COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: azrael on 02 Dec 2010 11:08:01 AM

Title: Calculate Measure with different Time Dimension Elements
Post by: azrael on 02 Dec 2010 11:08:01 AM
Hi there,
after spending half day of trying to find a solution, I'm aksing for expert help.

I have a cube based report that simply looks like this

                             Jan2010    FEB2010     MAR2010 .....
Qty (in to)                100          110           100
Gross Margin (GM)      200          200           200
GM/to                         2            1,8             2

Now I was asked to show another line that is calculated like that
GM Effect  = (QtyMonth - QtyMonthbefore) * GM/toMonthBefore.

So looking to the example it is (QTY of FEB2010 (110) - QTY of Jan2010 (100)) * GM/to (2),
so (110-100) * 2 = 20

This calculation should be done for each month/monthbefore comparison available in the actual year,
so Feb/Jan, Mar/Feb,.... in the same crosstab or in a new one.

I managed to calculate the qty-part dynamically, but did not manage to get the GM/to of monthbefore
as multiplier.

If any of you can help me in that case I you be very happy.

Thanks in advance.