Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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 Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tried the following solution which is not giving me the exact total time on one Document Number, it gives me accurate time on the last level which is SCP_LINE but on combining all it fails.
I created three measures to calculate Total Time
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 Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@tamerj1 Thanks for your reply it is 5 the moment I just share an example of one.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |