Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top N Filter Pane

Hello All,

I have a Customer data sheet and i have various charts showing the customer purchases and so on.. I want to have a filter 'Top n' customers so that the user will chose  the number n (5,10,15,20..) and see the visualizations accordingly.  Let say in the below example, I want to see a filter pane of Top 2,3,4 Customers.

Top n Customers
2
3
4

CustomerPurchase

A

salt

Atea
Bcoffee
Cfruits
Dsalt
Atea
Bcoffee
Bfruits
Csalt
Etea

Regards

1 Solution

Accepted Solutions
kaanerisen
Creator III
Creator III

Hi Prateek,

You can achive this easily by using qsVariable extension Qlik Branch

  1. First you need to define a variable like 'vTopN' and give a default value like 5.
  2. Add the extension and give name same as your variable.
  3. Add alternative values to variable like 5,10,20,All
  4. On chart, go to dimension property,change limitation to 'Fixed Value' and put $(vTopN) in the expression field.

Note : For All option in variable, you should write an expression like count(total customer)

TopN.png

I added a sample app, you can look at the 'Sales Analysis' sheet.

Hope it will help.

View solution in original post

4 Replies
kaanerisen
Creator III
Creator III

Hi Prateek,

You can achive this easily by using qsVariable extension Qlik Branch

  1. First you need to define a variable like 'vTopN' and give a default value like 5.
  2. Add the extension and give name same as your variable.
  3. Add alternative values to variable like 5,10,20,All
  4. On chart, go to dimension property,change limitation to 'Fixed Value' and put $(vTopN) in the expression field.

Note : For All option in variable, you should write an expression like count(total customer)

TopN.png

I added a sample app, you can look at the 'Sales Analysis' sheet.

Hope it will help.

Not applicable
Author

Hi Prateek,

First create a temporary table with alternate values, and load the table values in the filter pane.

Map / link with the main table.

Regards,

Rajesh R. S,

Not applicable
Author

Thanks a lot kaan

SL2
Contributor III
Contributor III

Hi Kaanerisen, I have question on your step 3: Add alternative values to variable like 5,10,20,All

Could you please advise more details on how to add alternative values? thanks!