Forum Discussion
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?
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.
Hi EdK99 ,
try this calculated column
Overtime =VAR _18_Time = 0.75RETURNIF([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
- Jacekk111Helper 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.
- mangaus1111Solution Sage
Hi EdK99 ,
try this calculated column
Overtime =VAR _18_Time = 0.75RETURNIF([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.