3 Replies Latest reply on Feb 19, 2018 9:10 PM by Shinichiro Murakami

    Difference between pivoted columns of the same measure

    charlie c

      If my data is something like this:

                                                                         

      CountryCityYearMeasure1Measure2
      Country1City120161010
      Country1City120171111
      Country1City220161010
      Country1City220171111
      Country1City320161010
      Country1City320171111

       

      I want to pivot it as below, with YoY being a calculated column indicating the difference between the aggregated measure values in 2017 and 2016.


      This seems simple but I am new to Tableau and can only pivot for one Measure and cant get the calculated column to work.

       

      Appreciate your help in this regards.

       

      I am using Tableau Desktop version 10.3.1

       

      (sorry i am unable to attach a workbook due to company policy)