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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
DWolsie
Contributor III
Contributor III

Rest-values of X-axis in Bar-chart

Hello everyone,

I've created a bar chart using two measures and want to only show a certain number of bars in the bar chart, with the rest showing as a 'others' bar at the end of the chart.

DWolsie_0-1730711622665.png

However, when I attempt to use it in the dimension, it only allows me to filter for it for one of the measures, and since its always 0 in the other column, it will always filter out one column.

DWolsie_1-1730712572253.png

Is there a fix to this? Perhaps similar to the summing function for sorting that I have used? Thanks in advance!

Labels (1)
2 Replies
ggijben
Partner - Creator II
Partner - Creator II

Hi, 

You'll likely need to create a calculated dimension using the IF statement alongside the RANK function. Here’s a pseudo-code example:

IF ( RANK(measure1 + measure2) < [desired number of bars], dimension)

Once you've created this, make sure to deselect the option to display NULL values for the dimension.

DWolsie
Contributor III
Contributor III
Author

Hi @ggijben,

Thank you for your swift response! Where exactly do I insert this formula? Do I replace my current dimension with it, add a new dimension or calculation condition...?