Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

1 Solution

Accepted Solutions
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

View solution in original post

17 Replies
arulsettu
Master III
Master III

HI

try this

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

Anonymous
Not applicable
Author

Hi Arul,

It is not working. Also here what 3 Ref?

arulsettu
Master III
Master III

hi

3 will return highest rank of all rows

can you  post sample data source

ecolomer
Master II
Master II

Try this:

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

Anonymous
Not applicable
Author

Hi Enrique,

    Still it is not working. $ didn't helped me.

-Jay

arulsettu
Master III
Master III

hey in rank function

Suppression of zero values is automatically disabled when these functions are used. NULL values are disregarded.

so why you using null()

ecolomer
Master II
Master II

For me is good, see this example

Anonymous
Not applicable
Author

Hi Arul,

Due to data sensitivity, I cant share.Like I shown earlier post, it is simple data.

alkesh_sharma
Creator III
Creator III

If you are not using a pivot chart, you can simply you can simply limit dimensions suing dimension limit tab.