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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Larry_Wang
Helper I
Helper I

Conditional formating

Hi to All,

 

I want to create a conditional formating for status ( See below picture for details ) and when I want to create rules it seems only can set for value or numbers in a range. Can any one give me some suggestions on how to do this? For example I want to set color for Production as green and Active for blue, etc. 

 

Larry_Wang_0-1625046712432.png

The format I want in Power BI

 

Larry_Wang_1-1625046883544.png

 

Thanks,

 

Larry

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Larry,

Create one calculated column from Status column:

conditional = switch('Table'[status],"Production",1,"active", 2,0)
And apply below conditional formatting on Status column:
mohityash_0-1625050859784.png

Desire Result:

mohityash_1-1625050895701.png

 



View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi Larry,

Create one calculated column from Status column:

conditional = switch('Table'[status],"Production",1,"active", 2,0)
And apply below conditional formatting on Status column:
mohityash_0-1625050859784.png

Desire Result:

mohityash_1-1625050895701.png

 



Hi Mohityash,
When I'm trying to use your suggested solution, after Switch, my desire table does not appear as an option, only the measures I've created. (see below)
Am I doing something wrong?  

 

Maryam_Pour_0-1628234089143.png

 

Hi @Anonymous ,

 

Thanks for the help on this issue and it works well for me😊

If Power BI allows us to create rule not only for numbers but also for texts, like in this case and it will be better.

 

Have a nice day!

 

Larry

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.