# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## Set color of pie chart based of one of three dimensions

I'm using an Expression to set the color of a Measure in a pie chart based on a dimension.  The dimension could be one of three options.  This will work for dimension option  - If(Dimension_A = "ABC, Blue()  -  For the three options I've tried

If(Dimension_A = "AAA", Blue() Or  If(Dimension_A = "BBB, Red()  Or  If(Dimension_A = "CCC, Yellow().

This does not work.  Can you help me with the correct syntax?  Thank you.

1 Solution

Accepted Solutions
MVP

## Re: Set color of pie chart based of one of three dimensions

not an or but an if ....else....else as Sunny already suggested

or a pick match

Pick(Match(Dimension_A, 'AAA', 'BBB', 'CCC'), Blue(), Red(), Yellow())

5 Replies
MVP

## Re: Set color of pie chart based of one of three dimensions

Try with single quotes:

If(Dimension_A = 'AAA', Blue(),

If(Dimension_A = 'BBB', Red(),

If(Dimension_A = 'CCC', Yellow())))

MVP

## Re: Set color of pie chart based of one of three dimensions

not an or but an if ....else....else as Sunny already suggested

or a pick match

Pick(Match(Dimension_A, 'AAA', 'BBB', 'CCC'), Blue(), Red(), Yellow())

New Contributor II

## Re: Set color of pie chart based of one of three dimensions

New Contributor II

MVP

Great