Forum Discussion
Calculate difference between latest shift date/time and previous shift date/time - direct query data
- 4 years ago
Anonymous ,
No you can not have a calculated column for that, You have to create a measure
Measure =
var _max = maxx(filter(allselected(Table), Table[Employee] = max(Table[Employee]) && Table[Pay Start] < max(Table[Pay Start])) , Table[Pay Start])
return
datediff(_max, max(Table[Pay Start]), day)
If needed use one more measuresumx(Summarize( Table, Table[Employee],Table[Pay Start]), [Measure])
use averageX if needed
Anonymous ,
No you can not have a calculated column for that, You have to create a measure
Measure =
var _max = maxx(filter(allselected(Table), Table[Employee] = max(Table[Employee]) && Table[Pay Start] < max(Table[Pay Start])) , Table[Pay Start])
return
datediff(_max, max(Table[Pay Start]), day)
If needed use one more measure
sumx(Summarize( Table, Table[Employee],Table[Pay Start]), [Measure])
use averageX if needed