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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
richardpayne
Creator
Creator

Bar Chart Color Corresponding to Dimension Value

I am attempting to create a bar chart where the color of the bar is permanently attributed to the value of a dimension.

I have orders with a given status: late, early, or on time. For each month, there are three bars for each of these values.

I want the "early" bar to be yellow, "late" to be red, and "on time" to be green. I have tried checking the "persistent colors", but this doesn't work. Eventually, as the data changes, the colors swap. Any ideas?

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Use "Background Color" attribute of the expression and determine your color based on the Dimension Value:

If (Dim1 = 'Late', red()) etc...

cheers,

Ask me about Qlik Sense Expert Class!

View solution in original post

5 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Use "Background Color" attribute of the expression and determine your color based on the Dimension Value:

If (Dim1 = 'Late', red()) etc...

cheers,

Ask me about Qlik Sense Expert Class!
richardpayne
Creator
Creator
Author

Oh, wow. The background color worked. I was concentrating on the color tab.

Thanks!

Not applicable

and how do I do the same for the value on the bar. I want negatives to be red, positives to be blue.

Not applicable

Nevermind, just found out.

Not applicable

Hello,

In additional, is it possible to attribute an image (like flag) corresponding to dimension value?

See joined file for example.

Thanks for your help

Laurent