COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Topic started by: sbest on 06 Jun 2007 02:34:52 PM

Title: Crosstab calculations
Post by: sbest on 06 Jun 2007 02:34:52 PM
i have a simple cross tab with product lines and years in the rows and months in the column with dollars as a measure. I want to add a percent difference for product lines from year to year.

PL  2006               10
      2007                5
      % change        .50


How do i add the % change, i can get it to total but not much else.
Title: Re: Crosstab calculations
Post by: larsonr on 06 Jun 2007 07:34:13 PM
The answer may lie in how you have the data set up.  Is 2006 and 2007 individual data items you created or are they automatically generated by dragging in an element of year. 

If they are individual items, then its just a matter of creating a query calc with the subtraction.

If its an dimension item like year, you may be able to use something similar to the decode function in oracle to create a calculation.  What database environment is your datasource running on?