Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
kennoe
Helper I
Helper I

Conditional formatting multiple values in a single column

I have a table that has a column with three values - Red, Amber, Green. I want to colour the cells in the table to match the words.

 

I have tried "Field Value" dialog in Conditional Formatting, but this only allows the one choice.

 

Based on this article "https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting", I have tried a power query formula (Scope being the name of the column containing the values):

#"ColourScope1" = if[Scope]="Green" then 1 else 2,
#"ColourScope2" = if[Scope]="Amber" then 2 else 3,
#"ColourScope3" = if[Scope]="Red" then 3 else 1,

 

and used the "Rules" dialog (Green = 1; Amber = 2; Red = 3) to show the colours but only the first colour shows. 

 

What am I doing wrong?

1 ACCEPTED SOLUTION

Found the solution. I was pointing the conditional formatting to the column rather than the measure..

View solution in original post

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @kennoe

Create a measure

Measure = SWITCH(TRUE(),MAX([Scope])="Green",1,MAX([Scope])="Amber",2,MAX([Scope])="Red",3)

3.png4.png

 

 

Best Regards

Maggie

Thanks Maggie

When i use this formula, I get the same result as my formula ie only the first value is recognised. I tested it on some dummy data and got the same result, only the first value is recognised. 

 

Steve

Hi @kennoe

Do you use a measure or a calculated column?

Could you show me your screenshot about the table and formula, also the setting page of conditional formatting?

 

Best Regards

maggie

Maggie

 

I used a measure. Refer screenshot.

 

BICapture2.JPG

 

I have set up the conditional formatting as shown below.

BICapture3.JPG

Found the solution. I was pointing the conditional formatting to the column rather than the measure..

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.