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

Top x sellers by revenue

Hi,

I would like to know the count of sellers responsible for 90% of our revenue. I've been trying to use the fractile function to get this but it's not working:

count(DISTINCT {<Revenue={">=$(=Fractile( Revenue,0.9))"}>} Seller)

The above set analysis returns a count of 4, the answer should be 22. Can anyone check out the attached qvw to see whether they know how to solve this?

Thanks in advance for any help.

Matt

4 Replies
Anonymous
Not applicable
Author

Hi Matthew,

please try:

count(DISTINCT {<Revenue={">=$(=Fractile( Revenue,0.90))"}>} Seller)



Regards

Neetha

Not applicable
Author

Hi Neetha,

You pasted the same set. Was there something else you meant to paste?

Matt

Anonymous
Not applicable
Author

Hi Matthew,

your expression:

count(DISTINCT {<Revenue={">=$(=Fractile( Revenue,0.9))"}>} Seller)


Mine:


count(DISTINCT {<Revenue={">=$(=Fractile( Revenue,0.90))"}>} Seller)


your set analysis returns a count of 4 instead of 22, so i thought it might be because of 0.9 you specified.

Change it to 0.90 and check if you get 22 count.


Regards

Neetha



Anonymous
Not applicable
Author

Hello,

I highly doubt fractile may work for your case since in your example it is only trying to divide the values of REVENUE field but what you need is the sum of REVENUE.

(Fractile( Revenue,0.90) should be wrong.What you need is something like FRACTILE(Sum(Revenue),0.9). But it would not work I guess.

Instead you can try consolidate it with a different logic. Maybe Rank(). Not sure.


BR


Serhan