Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
sanpor1zd
Contributor II
Contributor II

Filter pane and set analysis table for top 5.

Hello,

I have a filter pane which consists of employee names, 
and also a table to show the top 5sales from the selected employee. 

i've tried using 
Sum({<Employee= {'=Rank(Sum(Sales)) <=5'}>}Sales)

but all i get was one column in my table.

Thank you. 

Edited (I have included a sample data)

10 Replies
sumanta1234
Partner - Creator
Partner - Creator

Hi,

Use below exp:

IF(RANK(SUM([Sales]))<=5,SUM([Sales]))

sanpor1zd
Contributor II
Contributor II
Author

Hi,

Ive tried the code provided.
But the table only return 1 result. 

 

thank you.

tresB
Champion III
Champion III

Since you need to get top Sales, your ranking has to be based on sales. Try lie:

Sum({<Sales= {"=Rank(Sales) <=10"}>}Sales)

sanpor1zd
Contributor II
Contributor II
Author

Hi,

the code only return 1 result after filtering. 

 

tresB
Champion III
Champion III

Could you share a screenshot of where and how you are trying this?

sanpor1zd
Contributor II
Contributor II
Author

I have edit my post with a sample file for reference.

Whenever i choose a name using the filter pane, it only returns 1 result in my table.
Im trying to return the top 5 sales 

Capture.JPG

mfarsln
Creator II
Creator II

Hi,

Since you are using only one measure, it simply sums first 5 sales. In order to get 5 rows with top 5 sales, you should add a dimension which should be a rank column.

tresB
Champion III
Champion III

Create a master dimension like:

=Aggr(Sum({<Sales = {"=Rank(Sum(Sales)) <=5"}>}Sales), Sales)

Capture.PNG

sanpor1zd
Contributor II
Contributor II
Author

i tried the method, but the table only show the sales which the person have, not the top 5. test1.JPGtest2.JPG