Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

suhaibani_f
New Contributor II

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
Honored Contributor III

Re: Get Top 10 Total in Bar Chart Title

Hi Firas,

try this

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

Regards,

Antonio

pradosh_thakur
Valued Contributor III

Re: Get Top 10 Total in Bar Chart Title

Hi

IN addition to Antonio's solution try this

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


regards

Pradosh

galax_allu
Valued Contributor

Re: Get Top 10 Total in Bar Chart Title

=if(

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

City,

'Others'

)

suhaibani_f
New Contributor II

Re: Get Top 10 Total in Bar Chart Title

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!

suhaibani_f
New Contributor II

Re: Get Top 10 Total in Bar Chart Title

The above expression, gives syntax error

Community Browser