COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: ankit.agg.2008 on 05 Aug 2013 09:46:05 AM

Title: Issue in Crosstab row total
Post by: ankit.agg.2008 on 05 Aug 2013 09:46:05 AM
Hi,
Below is one requirement, suggest if there is any one come across the same earlier..

Issue Description : 1. Columns A is a static text column (Total Price,  Purchase Price,  Total Price/Purchase Price are static text) which are measures of the report.
                   2. Columns coming from DB field Zone which has 4 values ( North, South, East, West). So we have used Crosstabs for this.
                   3. To achieve this I have used 1 crosstab for each row and done corresponding total for each row.
                   4. BOX type for all crosstabs headings is set to None except to the first one.
                   5. Now the issue is in the total field of last row (Total Price/Purchase Price) which is coming as 8.33 (total of row) rather we need to show it as 1500/800 = 1.87

Kindly suggest.
Title: Re: Issue in Crosstab row total
Post by: Lynn on 05 Aug 2013 10:22:10 AM
Any reason why you have three crosstabs instead of just one that brings in Total Price and Purchase Price and then performs the calculation for total/purchase?

Create the summary row as automatic rather than total.

Attached is something similar from great outdoors sample data.
Title: Re: Issue in Crosstab row total
Post by: ankit.agg.2008 on 05 Aug 2013 10:44:29 AM
Hi Lynn,

Thanks for the reply. Separate crosstabs are used as combination of rows needs to be shown as different blocks.

Didn't get the way summary row is created. It will be great if you elaborate it a bit.

Thanks.
Title: Re: Issue in Crosstab row total
Post by: Lynn on 05 Aug 2013 10:47:14 AM
The summary row was created by having both measures in the same crosstab, and then using the calculate option to divide one by the other.

What do you mean by combination of rows shown as different blocks?
Title: Re: Issue in Crosstab row total
Post by: ankit.agg.2008 on 07 Aug 2013 02:17:49 AM
Actually in that crosstab, we had around 16 rows containing different calculation. But for the last column ( Total ) we need to show different aggregations for each of the row.

Like from the example which I provide, for the 1st and 2nd row it should be Total, for 3rd row it should be average of the row values. Like wise in some other row it should be the Maximum value from the row values.

I am also attaching one more attachment for more clarification.

Let me know if it is possible in One crosstab as by using one crosstab my other 2 issues will also resolve.  Thanks for your valuable inputs and time.