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

View all the Fabric Data Days sessions on demand. View schedule

Reply
EdK99
Frequent Visitor

math operators on hours

Hello,

 

I am developing a dashboard to analyze billable hours and overtime hours, my table has two time columns, "Work start time" and "Work finish time", I want to create a logic that will check whether the finishing time is after 18:00 or not, and if so, calculate how many hours of overtime it is. I've tried to apply basic math operators like greater than, but I don't think they work with that format. Any idea on how to do this?

2 ACCEPTED SOLUTIONS
Jacekk111
Helper I
Helper I

Hi, add extra column in Power Query or Power Bi, and seperate the time from this column and make formula like this 

IF Value([Time]) > TimeValue(18:00) then overtime else normal

and next make another column Value([Time]) - TimeValue(18:00). In power BI You can fillter next this quantity by "Overtime/Normal".  I wasn't input the formula in a line with power m/dax standards, only for expleaning the meaning.

View solution in original post

mangaus1111
Solution Sage
Solution Sage

Hi @EdK99 ,

try this calculated column

Overtime =
VAR _18_Time = 0.75
RETURN
IF(
    [WorkFinish] > _18_Time,
    [WorkFinish] - _18_Time
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
mangaus1111
Solution Sage
Solution Sage

Hi @EdK99 ,

try this calculated column

Overtime =
VAR _18_Time = 0.75
RETURN
IF(
    [WorkFinish] > _18_Time,
    [WorkFinish] - _18_Time
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jacekk111
Helper I
Helper I

Hi, add extra column in Power Query or Power Bi, and seperate the time from this column and make formula like this 

IF Value([Time]) > TimeValue(18:00) then overtime else normal

and next make another column Value([Time]) - TimeValue(18:00). In power BI You can fillter next this quantity by "Overtime/Normal".  I wasn't input the formula in a line with power m/dax standards, only for expleaning the meaning.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors