Saturday, April 27, 2013

How to show top N values and others in a chart

There is no default feature in Cognos to support Top N values. A sample is attached below to achieve this function, please download report specification (version10.1) if needed.

While query 1 is used to get the first chart, and Query 2 is based on Query 1, and used to generate second chart with top 5 values and others

Query 1

TotalRevenue4ProductType:      Total([Revenue] for [Product type])
RankProductType:     Rank([Revenue] at [Product type])

Query 2

No comments:

Post a Comment