Forum Discussion
Anonymous
2 years agoNot applicable
Difference between rows and category wise sum
I want to get the difference in time of two rows between out and in and then sum the differences for each category For example: I have the following columns- ECN_ID, Date, Time, In/Out I want to ...
- 2 years ago
Anonymous
you can create a column
Time difference =VAR _last=maxx(FILTER('Table','Table'[ECN_ID]=EARLIER('Table'[ECN_ID])&&'Table'[date]=EARLIER('Table'[date])&&'Table'[Time]<EARLIER('Table'[Time])&&'Table'[In/Out]="Out"),'Table'[Time])return if('Table'[In/Out]="In",'Table'[Time]-_last)then create a measureMeasure = sum('Table'[Time difference])pls see the attachment below
ryan_mayu
2 years agoSuper User
Anonymous
you can create a column
Time difference =
VAR _last=maxx(FILTER('Table','Table'[ECN_ID]=EARLIER('Table'[ECN_ID])&&'Table'[date]=EARLIER('Table'[date])&&'Table'[Time]<EARLIER('Table'[Time])&&'Table'[In/Out]="Out"),'Table'[Time])
return if('Table'[In/Out]="In",'Table'[Time]-_last)
then create a measure
Measure = sum('Table'[Time difference])
pls see the attachment below