# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save \$200. Learn More
Highlighted
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
Highlighted
New Contributor III

## Re: Colors in Color by Expression for more than one dimension?

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)))

2 Replies
Highlighted
New Contributor III

## Re: Colors in Color by Expression for more than one dimension?

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)))

Highlighted
Not applicable

## Re: Colors in Color by Expression for more than one dimension?

Thanks, that worked!