Skip to main content
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
Showing results for 
Search instead for 
Did you mean: 
Partner - Contributor II
Partner - Contributor II

Bar Chart Dimension Limitation issue


I am Facing an issue in Bar chart where I have Dimension, one Measure and one sorting Condition. 

now my requirement is that I need to sort using Sorting Condition and show only Top 5 records

but when I try to use dimension limit option here in Bar chart it actually get the Top 5 records of Measure.

Could anyone please help me out to get Top 5 Records on the basis on Sorting condition?



1 Reply
Contributor III
Contributor III


Create a counter column using your sorting condition in the script. Then use this counter column in a variable to sort the top 15.

Ex:  Autonumber(RowNo(), 'Sorting Column') as Counter

Then, create a variable:

let vTopN = 5;

Then in your measure expression:

Sum({<Counter = {"=$(vTopN)"}>}Measure

You can avoid the variable if you always need top 5 or can use it you want to make the selection dynamic using qsVariable.


Regards, Abhishek.