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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Jothi
Contributor III
Contributor III

Limiting Bar chart with Variable Input

The user wants to select top 10/20/50/ All items for the dimension in a bar chart. 

 

Selecting Top 10/20/50 I have implemented with a Variable input and associating it with the Bar chart Limits. But how to show All? How to dynamically remove the Limit set on the dimension?

Labels (2)
1 Reply
vinieme12
Champion III
Champion III

you need to filter top N based on the rank of the expression

example)

You need to use a calculated dimension in your chart

=if(aggr(rank(sum(Sales),4,2), YourDimension ) <= $(vYourVariable)  , YourDimension  , null() )

Then Uncheck show null values on

 

replace sum(Sales) with your chart expression

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.