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: 
Anonymous
Not applicable

Top N chart Help

Hi All,

I need to create a dynamic Top N performance chart. I am having Owner as a Dim and Count(Service) as Exp.

So my exp like below

if(aggr(rank(Count(Service)),Owner) <=v_Rank, Owner, null())

The Variable needs to get input from end user.Here I what I am missing

17 Replies
Anonymous
Not applicable
Author

Hi,

Enrique, I forget mention that I am using Bar chart. Will it make impact?And I need to have as a Expression. Not in calculated Dim.

alkesh_sharma
Creator III
Creator III

In a bar chart you can simply use dimension limit, no need to go for rank functions and select the expression on basis of which you want to create TOP values.

Regards,

Alkesh

arulsettu
Master III
Master III

have you tried by removing null

ecolomer
Master II
Master II

You can use the same expression on bar chart, also

Anonymous
Not applicable
Author

Hi Alkesh,

I can do that. But the limit should be dynamic. User will give run time values

arulsettu
Master III
Master III

try like this

=if(aggr(rank(Count(Service),3)<=$(v_Rank)),Owner, null())

Anonymous
Not applicable
Author

Yes, I missed that simple step...

alkesh_sharma
Creator III
Creator III

Yes you can do that, pass a variable in the limit tab, and give the user an input box.