If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Summarize a category after a certain rank

Started by ArnaudStephanHTH, 30 Sep 2019 05:17:52 AM

Previous topic - Next topic

ArnaudStephanHTH

Hello,

My data looks like that :


 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
WeekSectionQuantity
20A2
20B5
20C4
20D3
20E10
20F6
20G5.5
20H9
21A1
21B4
21C7
21D4
21E2.4
21F3
21G6
21H5

And I would like to show it in a pivot table, but I would like to only show the top 5 sections by week, summarizing the remaining sections in an "Other" category.

I created a rank like this : rank([Quantity] for [Week];[Year]) and filtered to only include the 5 top ranks. It works fine, but I don't know how to create the "Other" category and display it.

Any ideas on how to proceed ?

ArnaudStephanHTH

I found a solution, although I'm sure there are better ways.

First I created a new data item to categorize the ranks : CASE WHEN [Rank] < 6 THEN [Rank] ELSE 999 END
Then I computed the total based on this new data item :total ([Quantity] for [Rank Inf 5])

MatusM

Quote from: ArnaudStephanHTH on 30 Sep 2019 06:55:05 AMI found a solution, although I'm sure there are better ways.

First I created a new data item to categorize the ranks : CASE WHEN [Rank] < 6 THEN [Rank] ELSE 999 END
Then I computed the total based on this new data item :total ([Quantity] for [Rank Inf 5])

I have the same use case, but this solution is not working properly on Cognos 12.0.3.

Totals of top X items vs Other are not computed correctly, probably because Rank is being determined not in the beginning, but in parallel with Total calculation.

Solve order property of data items does not help either.