Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
StanD
Contributor
Contributor

stacked barchart and limitation

I've created a stacked bar chart with the following measures:

mbudget_spent, [mBudget exceeded], mbudget_remaining, mCost_amount.

 

I sort the bars by expression to have the chart sorted on the total height of the bars:

=RangeSum(mbudget_spent,[mBudget exceeded],mbudget_remaining,mCost_amount)

 

I only want to show the top 20 heighest bars, determined by the sorting above. Therefore I limit the dimension by a fixed number, 20. However, the limitation is calculated on only 1 measure, not the total height of the bar. The result is that the chart doe not show the 20 heighest bars. See picture below:

StanD_0-1658317632965.png

How can i fix this?

 

Labels (6)
3 Replies
edwin
Master II
Master II

you may have to limit the top 20 by set analysis - meaning calculate your measures only for the the top 20.  this will not leverage the limitation feature.

edwin
Master II
Master II

explore this pattern:

Sum({<Dim1={"=rank(yourMeasuresHere)<=20"}>}Measure)

 

StanD
Contributor
Contributor
Author

Thanks for your reply!

The issue with this solution is that the 'other' bar is not present, and we do not have te option to select the other bar to analyze the smaller bars.