Cognos Report : Display a different measure in row for the aggregated column
Posted on Monday 30 January 2012, 19:43 - Décisionnel - Permalink Tweet
- Article
- |
- Comments(0)
- |
- Attachments(0)
Following tip is when you use a Relational Datamodel (DMR).
In a Cognos Report crosstab, If You need to Display different measure in the aggregated column, you can do it using a simple if-then-else expression.
Explanation: You know if you are on a total column when the current context gives you more than one value for the year Axis.
isTotalYear Expression:
[script] if(count(distinct [year]) > 1) then(1) else (0)
Conditional Expression:
[script] if(count(distinct [year]) > 1) then([PackName].[Measures].[M1]) else ([PackName].[Measures].[M2])