If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Year clculation in Crosstab

Started by S_N_Solution, 07 Aug 2009 03:03:56 AM

Previous topic - Next topic

S_N_Solution

Hello,

I want to create a crosstab report in which some mesures have taken as Row.Year as a Column.At last printing the Total of those measures.I want to add some calculation in the column along with year column. like (2009/2008)-1,(2009/2007)-1 in percentage.How can i add those column.
Enclosing the report format for the refrence.Please help ASAP...

Thanks in advance.... :(

blom0344

1. Create dataitem (for each new column in report!) like:

Quote
(total((CASE WHEN [YEAR] = 2009 THEN [VALUE] ELSE 0 END))/
total((CASE WHEN [YEAR] = 2008 THEN [VALUE] ELSE 0 END)))-1

2. Add this to the right of the existing year column

3. Set aggregate property to calculated
4. format it as a percentage 

S_N_Solution

Hi,

Thanks..this will help me somehow but..

It is giving error as incompatible data type.
Also is it possible to make it dynamic because always the year would not be 2009.This can change.and the calculation should be till min of year.

blom0344

Just tested it, works for me, though only with fixed values for the year. I guess you can make this dynamic if you have a date prompt and take the year from the parameter associated.