Forum Discussion
sushmitasur4
2 years agoRegular Visitor
Hour Duration between two different rows from different columns in Power BI
So I am working with Live Data in POWER BI. I need a Query. What I really want is the Sum of Hours between (Start time when type = 3) and (End time when type = 3) Basically, It starts when ty...
Anonymous
2 years agoNot applicable
Hi sushmitasur4 ,
Why the Hours Duration is "01:06:00" when Index is 5? Could you please provide the related calculation logic?
Best Regards
sushmitasur4
2 years agoRegular Visitor
Here's the Pseudo Code of the logic calculation I need:
BypassedHoursColumn =
When typecolumn = 3: Variable MinTime = Start_TimeStamp
When typecolumn !=3:
IF PreviousRow((End_TimeStamp)) == Non-Blank:
Variable MaxTime = PreviousRow((End_TimeStamp)) and Store (MaxTime - MinTime)
IF PreviousRow((End_TimeStamp)) == Blank:
Variable MaxTime = PreviousRow((End_TimeStamp)) and Store (NOW() - MinTime)