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

Quartile

Customer is asking for Quartile metrics where the quartiles are based on literally 4 equal number of Clients (e.g. each quartile will be based on 1/4 of the number of Clients) and total sales. So quartile 1 will represent the top 25 clients based on sales (assuming 100 clients), quartile 2 will represent the next set of 25 clients based on sales volume, and so forth. Once I know my quartiles, I need to show other metrics based on the quartile as follows:

QuartileTotal SalesProduct AProduct BProduct C
1%%%%
2%%%%
3%%%%
4%%%%

One other note - Quartile is not a dimension in the data...it's calculated based on the selected data based on 25% increments of client sales.

Thanks,

Kevin

12 Replies
Not applicable
Author

Hello! How do I replace the "aggr" if I want to include this

'Q'&if(aggr(Sum(Sales),Customer) <= fractile(TOTAL aggr(Sum(Sales),Customer), 0.20), 1,

if(aggr(Sum(Sales),Customer) <= fractile(TOTAL aggr(Sum(Sales),Customer), 0.40), 2,

if(aggr(Sum(Sales),Customer) <= fractile(TOTAL aggr(Sum(Sales),Customer), 0.60), 3,

if(aggr(Sum(Sales),Customer) <= fractile(TOTAL aggr(Sum(Sales),Customer), 0.80), 4, 5))))

into the script, instead of expression?

Anonymous
Not applicable
Author

Olá estou enfrentando problemas para fazer o mostrador calcular o terceiro quartil de uma tabela, não consigo fazer calcular

dgreenberg
Luminary Alumni
Luminary Alumni

I am having trouble understanding you.  Google translates that to "Hello I'm having trouble making the dial calculate the third quartile of a table, can not I calculate"

What type of trouble are you having?