Forum Discussion
Anonymous
4 years agoNot applicable
Subtract two columns based on a third id Column
Hello, How would you reccomend finding the difference of 1st & 2nd event age? Each ID has a 1st event age, and if event 1 fails, another row with the same ID has a 2nd event age. ...
- 4 years ago
Anonymous
Are you looking for something like this ?
Step 1
Max Event Age = CALCULATE(MAX(ColumnDiff[1 Event Age]),ALLEXCEPT(ColumnDiff,ColumnDiff[ID]))Step 2Min 2Event Age = CALCULATE(MIN(ColumnDiff[2 Event Age]),ALLEXCEPT(ColumnDiff,ColumnDiff[ID]))Step 3Diff = ColumnDiff[Max 1Event Age]-ColumnDiff[Min 2Event Age]You did not mention about the output for which thre is no failure ?
Regards,
Ritesh
ribisht17
Super User
4 years agoAnonymous
Are you looking for something like this ?
Step 1
Max Event Age = CALCULATE(MAX(ColumnDiff[1 Event Age]),ALLEXCEPT(ColumnDiff,ColumnDiff[ID]))
Step 2
Min 2Event Age = CALCULATE(MIN(ColumnDiff[2 Event Age]),ALLEXCEPT(ColumnDiff,ColumnDiff[ID]))
Step 3
Diff = ColumnDiff[Max 1Event Age]-ColumnDiff[Min 2Event Age]
You did not mention about the output for which thre is no failure ?
Regards,
Ritesh
Anonymous
4 years agoNot applicable
Ah yes! Thank you, very clean way to do it.