Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandernatale
Creator II
Creator II

KPI Pareto

Hello everyone,

 

For a few days, I have been having a problem with Pareto analysis. I have read everything on the forum, but I haven't been able to find a solution.

What I would like to calculate is the distinct number of IDs that generate 80% of the revenue.

I tried using the following formula, but I think it has some sorting issues.

Count({<ID = {"=aggr(RangeSum(Above(Sum({...set analysis...}Sales), 0, RowNo())), (ID, (Sum({< ID >}, Year={'$(=max(Year))'}), Desc)))/(Sum(TOTAL {...set analysis...} Sales)) <= 0.8"}>} DISTINCT ID)

 

Similarly, I also tried to calculate the percentage of sales generated by the 20% of distinct IDs using the following formula:

Sum({...set analysis}, ID={"=Rank(Sum({...set analysis} sales)) < (Count(TOTAL DISTINCT {...set analysis...} ID) * 0.20)"}>} sales) / Sum({...set analysis...>} sales)

...and this one works well.

Can anyone help me? Thank you.

Labels (5)
0 Replies