COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: terry_stjean on 06 Apr 2010 01:34:12 PM

Title: Nested Total line
Post by: terry_stjean on 06 Apr 2010 01:34:12 PM
I have a report which has a nested level in the columns. The data source is a cube.
The report I am trying to develop looks like:
                                                        Jan     Feb    Mar   Apr ..............
Customer 1           Product 1                  xxx     xxx     xxx    xxx
                          Product 2                  xxx     xxx     xxx    xxx
                          Total Product            xxx     xxx     xxx    xxxx
Customer 2           Product 1                  xxx     xxx     xxx    xxx
                          Product 2                  xxx     xxx     xxx    xxx
                          Total Product            xxx     xxx     xxx    xxxx
Total Customer      Product 1                  xxx     xxx     xxx    xxx
                          Product 2                  xxx     xxx     xxx    xxx
My problem is with the Total Customer line.
I can add the Total Product line in the Product level.
I can get the Total Customer line working, however when I add the Products level in the Total Customer line, I get errors like "aggregate dataItem is not expected to nest non-measure.
This report also allow the user to drill down.
Any help would be great.
Title: Re: Nested Total line
Post by: CognosPaul on 06 Apr 2010 03:51:36 PM
With a crosstab like this I don't think you really need to use any aggregative functions.

Your crosstab should be set up like this:


Measure          | Months |
-----------------+--------+
Level   | Level  |  123   |
        | Measure|  123   |
--------+--------+--------+
Measure | Level  |  123   |
        | Measure|  123   |


Make sure the crosstab has the "Has Fact Cells" set to yes. Wherever you have Measure in the crosstab node simply change the source type to text and rename it.

Note this will only work if you're using a full level. If you want to use a set of members you should use total(currentMeasure within set [Set1])