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: 
M_Jay
Contributor III
Contributor III

Different color for subset value

Hi,

I need to give different color for certain % of the total value in a bar chart. Ex: $1000 Expenses as overall and only 3% of the value should be in the same bar. Is it possible in Qlik sense? If I use the stacked bar the subset is doubled --> one in the total value and as a separate value.

Thanks

Labels (1)
  • Chart

2 Solutions

Accepted Solutions
daturpin
Partner - Creator II
Partner - Creator II

Use a stacked bar but set your dimensions as

=0.03*[your expression]

=0.97*[your expression]

And order the dimensions such that the smaller value is shown on the bottom.

View solution in original post

M_Jay
Contributor III
Contributor III
Author

Thanks Daturpin for the solution. Is it possible not to adjust the measures values? I am trying to bring only the total expenses as a bar. But I want to show the subset in different color so that when I download the data the total remains the same.

I am trying to do it in the color option.

View solution in original post

3 Replies
daturpin
Partner - Creator II
Partner - Creator II

Use a stacked bar but set your dimensions as

=0.03*[your expression]

=0.97*[your expression]

And order the dimensions such that the smaller value is shown on the bottom.

M_Jay
Contributor III
Contributor III
Author

Thanks Daturpin for the solution. Is it possible not to adjust the measures values? I am trying to bring only the total expenses as a bar. But I want to show the subset in different color so that when I download the data the total remains the same.

I am trying to do it in the color option.

daturpin
Partner - Creator II
Partner - Creator II

I see the problem. You want the colors shown, but when you right click and download, you get the data in columns [dimension][0.97* expression][0.03* expression]?

That's a tough one. You could put in an alternate measure and only download when that 100% measure is selected...  Or you could download from another chart that doesn't have the 97/3 split, or you can accept some visual error by changing the 97% to 100% and it won't look quite right but the measure will download correctly.

Or you could do the colors in a whole other way that I am not aware of? I guess it depends on what your customer wants.