Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colors in Color by Expression for more than one dimension?

‌Hi, I've just downloaded Qliksense and have searched everywhere for help on this topic but have had no luck yet. I uploaded some dummy data and a created a pie chart out of it. I have three dimensions for the Status of some progress. The three statuses are "Green", "Red", and "Yellow". I want to color them accordingly l, so I have to use the expression editor. I understand how to create an if statement. However I'm not sure how to create an if statement for three possible colors? For example I have: if(Status="Green",rgb(#,#,#))  (I'm using placeholders for the rgb colors, don't have actual green color run codes on hand). Can someone please help me create the expression that displays all three colors accordingly? I've tried OR statements but that does not work. Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

1. Go to thePie Chart Appearance property,

2. Go to the Colors and Legend.

3. Make the colors to custom

4. Set it by Expression

5. Put this expression: =if(Status='Yellow', rgb(255,242,0), if(Status='Green', rgb(0,255,0),rgb(255,0,0)))

chart.PNG

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi,

1. Go to thePie Chart Appearance property,

2. Go to the Colors and Legend.

3. Make the colors to custom

4. Set it by Expression

5. Put this expression: =if(Status='Yellow', rgb(255,242,0), if(Status='Green', rgb(0,255,0),rgb(255,0,0)))

chart.PNG

Not applicable
Author

Thanks, that worked!