Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a way to filter top 5 selling countries on a map chart?
I have Country (country_name) as a point layer and used Sales (sales_amount) in the following expression:
Aggr(Max(sales_amount), country_name)
It's seems that the expression works, but how do I get the top 5 Countries? I tried using 'Rank' in the expression but it only returned 1 Country:
Aggr(Rank(Max(sales_amount),country_name),<=5)
Best regards,
Linas
try with
=IF(Aggr(Rank(SUM(sales_amount),4),country_name)<=5,country_name)
Hi Alessandro,
Thanks for a quick response.
2 things here:
1) The chart doesn't display anything if an option 'Use size' is selected.
2) Shows all countries, if de-selected.
By the way, this refers to QlikSense.
Thanks again,
Best regards,
Linas
why don't you go to Dimension Limits in the chart properties and there specify the top 5 , leave the measure expression without the rank
sum(sales_amount)
dimension country
chart properties top 5 ,
let QlikView do its job
Hi Mario,
That option doesn't exist on Map chart.
Many thanks,
Linas
By the way, it's QlikSense
QlikSense 🙂
Can you try this in the expression?.
IF( Aggr(Max(sales_amount), country_name) <= 5 ,
SUM(SALES_AMOUNT))
sorry, it is
IF( Aggr(RANK(sales_amount), country_name) <= 5 ,
SUM(SALES_AMOUNT))
I have a copy now of Qliksense on hand, I typed the expression
SUM ( IF( Aggr(RANK(SUM(sales_amount)), country_name) <= 5 ,
sales_amount
)
)
you can even return the country names instead
=concat ( IF( Aggr(RANK(SUM(sales_amount)), country_name) <= 5 ,
country_name
)
)
Thanks Mario, both return only 1 (top) selling country.