Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi
I have a matix visual that contains peoples names in the first column, dates across the header row and the values are times hh:mm:ss. I would like to conditionally format the time values if they meet the criteria below. I am asuming this woud have to be done in dax
Before 16:00:00 = Red
Between 16:00:00 - 17:00:00 = Orange
Between 17:00:00 - 17:30:00 = Green
Between 17:30:00-18:00:00 = Blue
After 18:00:00 = Grey
Example of matrix
| Alan | 17:25:35 | 17:48:11 | 17:48:11 |
| Alistair | 16:49:32 | 17:06:17 | 17:06:17 |
| Andrew | 19:15:00 | 23:30:00 | 23:30:00 |
| Anthony | 17:34:35 | 17:32:35 | 17:34:35 |
| Bradley | 00:00:00 | 23:30:00 | 23:30:00 |
| Carl | 17:54:21 | 18:02:34 | 18:02:34 |
| Curtis | 17:41:43 | 16:48:43 | 17:41:43 |
| Dave | 18:01:08 | 17:24:59 | 18:01:08 |
thank you Richard
Solved! Go to Solution.
@cottrera , Create a color measure like
Switch(True(),
max([time]) =<time(16,0,0) , "red",
max([time]) >time(16,0,0) && max([time]) =<time(17,0,0), "Green",
max([time]) >time(17,0,0) && max([time]) =<time(18,0,0), "Blue",
"grey"
)
use that in conditional formatting with field value option
refer for steps :
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Works perfectly thank you as always😁
@cottrera , Create a color measure like
Switch(True(),
max([time]) =<time(16,0,0) , "red",
max([time]) >time(16,0,0) && max([time]) =<time(17,0,0), "Green",
max([time]) >time(17,0,0) && max([time]) =<time(18,0,0), "Blue",
"grey"
)
use that in conditional formatting with field value option
refer for steps :
https://www.youtube.com/watch?v=RqBb5eBf_I4
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |