2 Replies Latest reply on Sep 24, 2018 2:03 PM by Thanushree Sampangi Pushpa

    get the difference of the number in the Same column with different conditions

    Thanushree Sampangi Pushpa

      In the attached Excel I have 4 columns  Tech,MiscID, Total mins, Actual mins. What I'm trying to populate is the Actual mins column which is calculated by taking the difference of the Total mins based on hte consition MiscID.

       

      For example:-

      For tech #3

      miscId =0  Total mins = 476

      MiscID <> 0 Total Mins= 59

       

      I'm trying to populate a new column with the difference of these two Total mins which is 476-59 = 417.

       

      I tried  (if [Misc ID] =0 then [Total mins] Else 0 end ) - (if [Misc ID]<>0 then [Total mins] else 0 end)

       

      in the calculated field but it just duplicates the total mins. Any help is appreciated.