COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: DTV12345 on 04 Jan 2013 07:01:01 PM

Title: How to use Cognos report studio to change default Total() calculation
Post by: DTV12345 on 04 Jan 2013 07:01:01 PM
I have a crosstab report that calculates for failure rates for my products ; it has two measures (PASSCOUNT, FAILCOUNT) and a calculation FAILRATE (FAILCOUNT/PASSCOUNT+FAILCOUNT)

The report layout looks thusly:
                   OEM
                   MODEL
TESTYEAR TESTMONTH PASSCOUNT FAILCOUNT FAILRATE

When I select the Total icon, it logically adds up each of the columns like so
2012 OCT 7547  697  0.08
     NOV 9570  373  0.04
     DEC 1879  107  0.05
------------------------
Total   18996  1177 0.17

My user however wants TOTAL FAILRATE to be
TOTAL FAILCOUNT/(TOTAL PASSCOUNT+TOTAL FAILCOUNT)
which translates to
1177 / (18996+1177) = 0.058 (instead of 0.17)

How can I create this custom total in the report? I am reading about creating a Query calculation but I am not clear this is the right approach.

Cognos Report Studio 8.4 IBM DB2 UDB
Title: Re: How to use Cognos report studio to change default Total() calculation
Post by: CognosPaul on 05 Jan 2013 01:48:52 PM
Try setting the solve order on the Failrate to 2.
Title: Re: How to use Cognos report studio to change default Total() calculation
Post by: mtirpude on 07 Jan 2013 01:31:27 AM
Hi,
Go to your query
1. Drag a data item from toolbox, create calculation as -
total([Passcount] for report)
Name it as Total Passcount
2. Drag a data item from toolbox, create calculation as -
total([Failcount] for report)
Name it as Total Failcount
3. Drag a data item from toolbox, create calculation as -
[Total Passcount]/[Total Failcount]
Name it as FailRate
4. Now, drag this FailRate at the crosstab total position by unlocking the crosstab.

Regards,
Manish Tirpude
mtirpude@infocepts.com
www.infocepts.com