Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sasikanth
Master
Master

Aggregation of country sales based on Year

HI Guys

Here i have requirement

i want to find the sum of  top 10 sales of country on every year

means for evry year ---> sum(top 10 country sales) i need to show

can any body please assist me on this

Thanks

5 Replies
tresesco
MVP
MVP

Many discussions you would find here like: How to get Top 5 Sales?

ashfaq_haseeb
Champion III
Champion III

Hi,

have a look at attached application.

Regards

ASHFAQ

sasikanth
Master
Master
Author

thanks for the reply

Here i am using BAR chart and Year as Dimension

i want to write an exps  like , sum(top 10 county sales) and sum(othen top 10 county sales )

Thnaks

PradeepReddy
Specialist II
Specialist II

Try something like this...

sum({<COUNTRY_CD={$(=concat(if(aggr(rank(sum(SALES_AMT)),COUNTRY_CD)<=10,chr(39) & COUNTRY_CD & chr(39)),','))}>}SALES_AMT)

jansen28
Contributor III
Contributor III

I hope you are expecting something like this. please try the below one:

Dimension 1: Year

Dimension 2:

=if(aggr(rank(sum(Sales)),Country)<=10,Country,

if(aggr(rank(sum(Sales)),Country)>10 and aggr(rank(sum(Sales)),Country)<=20,'Other 10','Others'))

Exp: sum(Sales)

When you select Other 10 you will get the 'Top 10' in Others category.