COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: erics on 14 Dec 2015 12:43:20 PM

Title: Totals on right side in crosstab with 2 measures
Post by: erics on 14 Dec 2015 12:43:20 PM
I've been tasked with adding to a report a crosstab that has 2 measures. Number of clients and amount that they pay per product.
So,basically, it looks like this:
              Clients, $
Product
               Total,total
When I do this with only one measure, at the bottom we see the total of that measure, and on the right side we see total by product. However when I add the second measure, the totals per product disappear.
Is there a way to add two columns on the right containing the totals per product?

And I'd like it to look like this:
So,basically, it looks like this:
              Clients, $
Product                        total,total
               Total,total
Title: Re: Totals on right side in crosstab with 2 measures
Post by: MFGF on 15 Dec 2015 03:30:40 AM
Quote from: erics on 14 Dec 2015 12:43:20 PM
I've been tasked with adding to a report a crosstab that has 2 measures. Number of clients and amount that they pay per product.
So,basically, it looks like this:
              Clients, $
Product
               Total,total
When I do this with only one measure, at the bottom we see the total of that measure, and on the right side we see total by product. However when I add the second measure, the totals per product disappear.
Is there a way to add two columns on the right containing the totals per product?

And I'd like it to look like this:
So,basically, it looks like this:
              Clients, $
Product                        total,total
               Total,total

Are you using a relational or a dimensional package? Assuming it's relational...

Add a query calculation to the right of the columns, call it Product Measure 1 Total, and code the expression as total([Your first measure] for [Your Product item])
Repeat for the second measure.

Cheers!

MF.
Title: Re: Totals on right side in crosstab with 2 measures
Post by: erics on 15 Dec 2015 10:01:59 AM
Worked great, thank you.
I just had to add a query calculation to the crosstab. Only catch was that I had to add to the top level of the crosstab so that it it appears at the end of the crosstab.