COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Zimbo_African_1980 on 21 Aug 2019 04:48:46 PM

Title: Percentage Calculation
Post by: Zimbo_African_1980 on 21 Aug 2019 04:48:46 PM
Hello,
I'm working on a report that aims to identify and count ONLY Top 20 Salesmen based on Top 20% of total Sales.

So for example, if total sales in $120 then top 20% Sales would be $24. So I want the exact count of the salesmen who made those sales.
I have tried adding a running-total on the [sales amount] , then
count(if([running total sales amt] < [20% Sales]) then ([Salesmen_ID]) else (null))

For some reason, this still gives me the count of 20% of the total number of Salesmen in general. Looking at the raw data, I should get only 5.

I hope make sense, if not please let me know.

Thanks for your time.