Forum Discussion
MAZHAR
3 years agoFrequent Visitor
CALCLATE TIME BETWEN INTERVALS
I have a large Excel sheet like this where Document Numbers will be listed along with all other information as in the picture. I want to calculate the following. Total Time (Minutes) = (STAR...
- Anonymous3 years ago
Hi MAZHAR ,
I suggest you to create virtual table in your calculation and then use SUMX to achieve your goal.
Total Time = VAR _SUMMARIZE = SUMMARIZE ( 'MCH_WorkStatusD', MCH_WorkStatusD[Line], MCH_WorkStatusD[SCP_Line], "Diff", VAR _STATR = CALCULATE ( MAX ( MCH_WorkStatusD[Time] ), MCH_WorkStatusD[CONDITION] = "START" ) VAR _END = CALCULATE ( MAX ( MCH_WorkStatusD[Time] ), MCH_WorkStatusD[CONDITION] = "END" ) RETURN DATEDIFF ( _STATR, _END, MINUTE ) ) RETURN SUMX ( _SUMMARIZE, [Diff] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.