Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
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?
Thanks
Hi,
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.