Forum Discussion
Varan_15
3 years agoHelper III
Time Difference based by workstep wise
Hi All, I have data which is contains workstep (input, process, rejected, completed) i want to calculate the time differences between (first input entry time - last completed exit time ) Exa...
Varan_15
3 years agoHelper III
Hi Jihwan_Kim ,
I need to create calculated column if use above mentioned dax it's taking entire data in min/ max values but i need only workstep input - min entry date - completed max exit date
Thanks
Jihwan_Kim
3 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Total minutes took CC =
VAR _inputentrymin =
MINX (
FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) && Data[Workstep] = "Input" ),
Data[Entry time]
)
VAR _completeexitmax =
MAXX (
FILTER ( Data, Data[ID] = EARLIER ( Data[ID] ) && Data[Workstep] = "Completed" ),
Data[Exit time]
)
RETURN
IF (
Data[Workstep] = "Completed",
DATEDIFF ( _inputentrymin, _completeexitmax, MINUTE )
)