cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
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.

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.
2 REPLIES 2
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.
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.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.