COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: GGowtham on 22 Mar 2013 03:02:31 PM

Title: How to calculate variance in a crosstab based on dimensions in the column
Post by: GGowtham on 22 Mar 2013 03:02:31 PM
I have a cross tab with 10 different measures in a  row and 3 dimensions (Months(12) ,Current year total, Previous year total, Variance) as columns
I need to calculate the variance on the column as (Current yr - previous year)/previous year , Since I have only dimension values in the column I am not able to get the running-difference of the year (Even subtracting current year - previous year is not working )
Please help me in calculating the variance

eg Cross tab
                           (Jan Feb Marc .... Dec), Current year =2013 , Previous Year =2012 ,  variance ??
Measure 1 (Amt)
Measure 2 (%)
Measure 3 (Amt)
Similarly 10 ten measures.

Please guide me how to acheive this , I have asked many people none is able to answer it.. ( Question looks simple but difficult to acheive )
Title: Re: How to calculate variance in a crosstab based on dimensions in the column
Post by: MFGF on 25 Mar 2013 09:51:43 AM
Are you using a dimensional package? If so, this ought to be very easy. With a relational package (query subjects and query items) it would be pretty difficult.

Regards,

MF.
Title: Re: How to calculate variance in a crosstab based on dimensions in the column
Post by: GGowtham on 26 Mar 2013 12:11:20 AM
I am using a relational package only, Can you just tell me some approaches how I can acheive this in a relational model , So that it would be helpful , Thanks !!