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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Conditional formatting based on multiple conditions

I have a table where each row has a status.  The status can be one of five: 1-Submitted, 2-Approved, 3-Rejected, 4-Scheduled, 5-Created.  I would like to conditionally color the background row color based on the value of the Status column.    So have a blue for Submitted, Green for Approved, Red for Rejected, Yellow for Scheduled, Black for Created. 

 

When I got into Conditional Formatting for the table, it only lets me use 'Count' of a value.  What am I missing here or is this not possible?  Thanks

 

 9-18-2018 7-59-17 AM.png

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

You will want a numeric measure like this:

 

Measure 5 = 
VAR __value = MAX(Table11[Column2])
RETURN SWITCH(TRUE(),__value = "Submitted",1,__value = "Approved",2,__value = "Rejected",3,__value = "Scheduled",4,__value = "Created",5)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

go to your table.

right click for conditinal formatting. 

Conditinal formatting.png

format by rule.

select here you new measure wich only get numbers as result.

and then make the good rules wich numer gets wich color. maybe play a little bit with this combination 

Conditinal formatting2.png

 

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

You will want a numeric measure like this:

 

Measure 5 = 
VAR __value = MAX(Table11[Column2])
RETURN SWITCH(TRUE(),__value = "Submitted",1,__value = "Approved",2,__value = "Rejected",3,__value = "Scheduled",4,__value = "Created",5)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Got it!  I had to change to Rules.  Thanks

Anonymous
Not applicable

Then in conditional formatting how would I apply the value of the ___value variable?

go to your table.

right click for conditinal formatting. 

Conditinal formatting.png

format by rule.

select here you new measure wich only get numbers as result.

and then make the good rules wich numer gets wich color. maybe play a little bit with this combination 

Conditinal formatting2.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.