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

Expression chart colors depending on the dimension for no selected values

I was planning to do a Straight Table chart like this:
desired_result
The four dimensions should always appear and have exactly the same colors (the only variation is the expression values).
What I have now is the dimensions and the values as I want except for the colors. The initial data is organized in a table like:
Project Status 1 Completed 2 On Track 3 On Track 4 Deviating 
So the #RA variation is the percentage of each status value from the total. However, it can happen that in some cases one status value is 0. And I get this:
actual_result
The condition for the colors is set in the color background expression, like this:
colors_setting
I also have to say that as some fields of the dimension have no values they disapear, so they are forced to appear using the Show All Values in the dimension tab.
Any one knows how to make the colors always fixed for its dimension even when the value is null?
Thanks for the attention
1 Solution

Accepted Solutions
sunny_talwar

Does this happen after making selections, if it does, try to wrap your expression around with Only({1} ....)

Only({1} YourIfStatementForColor)

View solution in original post

3 Replies
sunny_talwar

Does this happen after making selections, if it does, try to wrap your expression around with Only({1} ....)

Only({1} YourIfStatementForColor)

Anonymous
Not applicable
Author

Thanks Sunny Talwar, it worked perfectly

sunny_talwar

Awesome

Please close the thread by marking the correct response if you got  what you wanted.

Best,

Sunny