Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get Top 10 Total in Bar Chart Title

Hello Everyone!

I have a bar chart of top 10 cities, I reached this by setting the dimension as City_name and by changing the setting in the bar chart dimension's "Limitation" option to 10 without showing others. Now, in the Chart's title i'd like to count the total customers of those 10 cities only. My question is, how can I get the total customers pf those cities?

waiting for your kind cooperation, Thanks!

5 Replies
antoniotiman
Master III
Master III

Hi Firas,

try this

=Count({<City={"=Rank(Count(DISTINCT Customer)) <= 10"}>} DISTINCT Customer)

Regards,

Antonio

pradosh_thakur
Master II
Master II

Hi

IN addition to Antonio's solution try this

sum(if(Rank(expression) <= 10,expression,0)


regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

=if(

Aggr(Rank(count(customer)), City)<=10,

City,

'Others'

)

Anonymous
Not applicable
Author

Thanks for your fast reply. This have given me the closet result; however, its not quite what I am looking for. This gives the top 10 cities perfectly, but the count is incorrect. Any ideas?

Thanks!

Anonymous
Not applicable
Author

The above expression, gives syntax error