Forum Discussion
rebrow31
4 years agoHelper I
Find the difference between earliest and latest datetime
Hi, I have a table which holds data for every part that is produced. When a part is produced, it has a date time stamp (see below): I have then easily created a visual which shows m...
- Anonymous4 years ago
Hi rebrow31 ,
I think you can try DATEDIFF function in your code.
Calculated column:
Column = VAR _SECOND = DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND) RETURN DIVIDE(_SECOND,60)Measure:
Measure = VAR _Summarize = SUMMARIZE('Table','Table'[Earliest DateTime],'Table'[Latest DateTime],"Minute", DIVIDE(DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND),60)) RETURN SUMX(_Summarize,[Minute])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.
lbendlin
4 years agoSuper User
([Latest DateTime]-[Earliest DateTime])*1440