Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi Team,
I have the time values with "00:00" format in table visual(like below snapshot). I need to do conditional formatting like
a) 00:00 to 01:59 with no background color, leave it as it is.
b) 02:00 and remaining all values need to change with background color is red.
I have created a simple measure, setting highlight to yes/no, then do conditional formatting:
Kindly help me please!
Thanks in advance.
Solved! Go to Solution.
 
					
				
		
Hey, could you give this a try:
HighlightTime =
VAR _time = SELECTEDVALUE('Table'[Column1])
VAR _timeValue = TIMEVALUE(_time)
VAR _highlight =
IF(
_timeValue >= TIME(0,0,0) && _timeValue < TIME(2,0,0),
0, // no color
1 // red color
)
RETURN _highlight
 
					
				
		
Hi @Ayyappa5678 ,
@Anonymous nice method!And here's my solution on cell elements format.
Here is my test data:
1.Create a measure
HighlightTime =
VAR _time =
    TIMEVALUE ( SELECTEDVALUE ( 'Table'[Column1] ) )
VAR _highlight =
    IF ( _time >= TIME ( 0, 0, 0 ) && _time < TIME ( 2, 0, 0 ), 0, 1 )
RETURN
    _highlight
2.Formatting cells
Go to Format Visual ->Format your visual
->cell elements and apply measure as a function of background color
3.Final output
 
Best Regards,
Albert He
Thank you so much @Anonymous @Anonymous
No problem at all, happy that we could give a solution 🙂
 
					
				
		
Hi @Ayyappa5678 ,
@Anonymous nice method!And here's my solution on cell elements format.
Here is my test data:
1.Create a measure
HighlightTime =
VAR _time =
    TIMEVALUE ( SELECTEDVALUE ( 'Table'[Column1] ) )
VAR _highlight =
    IF ( _time >= TIME ( 0, 0, 0 ) && _time < TIME ( 2, 0, 0 ), 0, 1 )
RETURN
    _highlight
2.Formatting cells
Go to Format Visual ->Format your visual
->cell elements and apply measure as a function of background color
3.Final output
 
Best Regards,
Albert He
Thanks! All looks great on the cell formatting too, hopefully this gives the user a solution.
 
					
				
		
Hey, could you give this a try:
HighlightTime =
VAR _time = SELECTEDVALUE('Table'[Column1])
VAR _timeValue = TIMEVALUE(_time)
VAR _highlight =
IF(
_timeValue >= TIME(0,0,0) && _timeValue < TIME(2,0,0),
0, // no color
1 // red color
)
RETURN _highlight
 
					
				
				
			
		
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |