COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: antexity on 26 May 2011 09:12:37 AM

Title: How to Sum Crosstab even if you can't / 0
Post by: antexity on 26 May 2011 09:12:37 AM
Hello All,

Hopefully this is possible.   I have a rolling 13 month crosstab.  Everything is working great.   What I would like is the following:

Currently if I run the report I get the following output:




Apr10May10Jun10Jul10Aug10Sep10Oct10Nov10Dec10Jan11Feb11Mar11Apr11May11Rolling AVG
$2343$1234****$2435$2342$2652$1234$4321$2345$5432****$2343$2343$2343$2343

The ****, I placed those in as a value when it cannot divide by Zero.  The Measure I have is:

Measure = ['A'] / ['B']

Now when I calculated the Rolling Avg, it only calculates the totals that have a answer it does not incl the ****, make sense.  But I would like to do is actually calculate all the ['A'] / all the ['B'] as a whole even though ['B'] is zero sometimes. Therefore Sum up all the ['A'] for the Rolling 13, Value or no value / sum up all the ['B'] value or no value.

Hopefully that makes sense and that there is a solution,

Thank you!
Jonathan
Title: Re: How to Sum Crosstab even if you can't / 0
Post by: antexity on 27 May 2011 08:29:54 AM
Does anyone know if this can be done?

Thanks,
Jonathan