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: 
Not applicable

Selecting the 10 customers with the biggest loss

Hello,

I need to select the 10 customers with the biggest loss compared to last year (10 worst performers). I've used the ranking function to select the bottom 10:

=if(aggr(rank((sum({$<Jaar={$(vCurrentYear)},md_aggregatie_klantgroep4_Naar.aggregatie02={'Eigen klanten'}>}md_omzet.omzet)-sum({$<Jaar={$(vPreviousYear)},md_aggregatie_klantgroep4_Naar.aggregatie02={'Eigen klanten'}>}md_omzet.omzet))*-1,1),md_aggregatie_klantgroep2_Naar.aggregatie02, md_niveau_statisch_Naar.firmanaam)<=10,md_niveau_statisch_Naar.firmanaam &', '& md_niveau_statisch_Naar.woonplaats)

The correct customers are selected, but sometimes only 9 customers are displayed and sometimes 11 customers are displayed. Could somebody please help me and tell me why this happens and how to solve this problem?

Regards,

Johan

3 Replies
johnw
Champion III
Champion III

Did more than one customer have the same loss compared to last year? They would then have the same rank, so that might be part of an explanation.

As for another approach, perhaps sort by the loss in descending order, and then set the maximum displayed customers to 10.

Not applicable
Author

The odd thing is that the biggest loss maker is always named - and the loss looks like the sum of all losses not displayed in the pivot table.

I tried your suggestion to make a Straight Table and selecting the maximum customers to display at 10. The only trouble is that I need this data in for each individual account manager in one table and now only one account manager is displayed. Fortunatly the 10 correct customers are selected for the account manager that is displayed, so that works fine.

Not applicable
Author

Hi all,

Can some one help me out here as it is almost the same in my case. Hope to get some solution soon.

http://community.qlik.com/forums/t/25439.aspx

Thanks and Regards,

Rikab