Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
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.