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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
alexw94
Helper I
Helper I

How to do conditional formatting RAG for time values?

So I am wanting to create a RAG for time values. All this data comes from an excel spreadsheet as its data source. The original data showing the matrix table is average time values. The averages are worked out from the raw data and converted to averages in the measure named "New average times". I need all these time figures to have a RAG based on the second screenshot, the screenshot has the required RAG status based on which sports race. My question is simply how do I get this into RAG based on this?Screenshot 2023-05-25 at 21.07.39.pngScreenshot 2023-05-25 at 21.07.30.png

2 REPLIES 2
amitchandak
Super User
Super User

@alexw94 , You can create a measure and use that in conditional formatting using field value option

 

Switch(Max(Table[Race]) ,
"Race" , Switch( True() ,
[New Avg Time] < time(0,0,20) , "Green",
[New Avg Time]< time(0,0,40) , "Amber", "Red" ),
"Swim" , Switch( True() ,
[New Avg Time] < time(0,1,0) , "Green",
[New Avg Time]< time(0,1,20) , "Amber", "Red" ),
Switch( True() ,
[New Avg Time] < time(0,0,55) , "Green",
[New Avg Time]< time(0,1,30) , "Amber", "Red" ) )

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  - thanks, I am not wanting to apply it to a pie chart, I am wanting the RAG colours to appear in the matrix table in my screenshot. After creating that measure, how do I implement that measure into the conditional formating for the time values I have created?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.