Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
68 | |
43 | |
34 | |
26 |
User | Count |
---|---|
86 | |
50 | |
45 | |
38 | |
38 |