Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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.    ...
  • ribisht17's avatar
    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 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