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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.