6 Replies Latest reply on Nov 28, 2016 12:17 PM by Tom W

    How to have the % change in a table?

    Chris Ma



      I am having the data set as below, the upper table in the picture below. In Tableau, I have 1 dimension - Period, and 3 Measures - Sales, Spend, Traffic. CY is Current Year; LY is Last Year.


      I want to achieve a Tableau table in the format of the lower part of the screenshot, where it sums Sales, Spend, Traffic in LY and CY, and have LY Var as (CY-LY)/LY - the percentage change of Current Year (CY) from Last Year (LY).


      Any idea?


      Right now, I manually created another 3 rows in Excel following LY, LY Var, and calculated the difference. But then in the Tableau table, it will only show the numeric different, not the % difference. If I calculated the % difference in Excel, then LY Var % difference will be summed up, because Sales, Spend, Traffic for LY and CY are summed. LY Var % difference should be averaged, not summed.


      Appreciate your help!