Forum Discussion
drad2211
6 years agoFrequent Visitor
dax time difference help
Hi I have a somewhat similar question. I have a table that has the following columns (ID, Time, Action) and I want to add a new column (I believe by making a DAX equation) that can show the time ...
- 6 years ago
Hi drad2211
1. Add the index column in power query
2. Add the measure below:
Measure = var a = CALCULATE(MAX('Table (2)'[Time]),FILTER(ALL('Table (2)'),MAX('Table (2)'[Action])="Out"&&[Index]<MAX('Table (2)'[Index])),VALUES('Table (2)'[ID])) Return DATEDIFF(a,MAX('Table (2)'[Time]),MINUTE)
v-diye-msft
6 years agoCommunity Support
Hi drad2211
1. Add the index column in power query
2. Add the measure below:
Measure = var a = CALCULATE(MAX('Table (2)'[Time]),FILTER(ALL('Table (2)'),MAX('Table (2)'[Action])="Out"&&[Index]<MAX('Table (2)'[Index])),VALUES('Table (2)'[ID]))
Return
DATEDIFF(a,MAX('Table (2)'[Time]),MINUTE)