1 Reply Latest reply on Jul 11, 2019 4:55 PM by Naveen B

    Help with calculated field

    Mehdi Sadeghi

      Hi all,

       

      I have a below table and as you can see there is only one "Loss" for each model per location.

      Capture1.JPG

       

      If I want to show the absolute difference between the models per location, can I do it in Tableau while I have them all in one column?

      My concern is creating a calculated field within one column having a condition (the result should look like below).

      Capture2.JPG

       

      Thanks,

      Mehdi

        • 1. Re: Help with calculated field
          Naveen B

          Hi Mehdi ,

           

          Create a calculation like below

          SUM(IF MODEL = 'AIR' THEN Loss END)

          -

          SUM(IF MODEL = 'RMS' THEN Loss END)

           

          Drag the Long and Lat to columns and the created calc field to text

           

          you will get the O/P

           

          hope this helps

          Plz mark this answer as correct & helpful to close the thread

           

          BR,

          NB