4 Replies Latest reply on Jul 28, 2016 8:37 AM by Emily Shen

    calculate difference across a dimension when prior value missing

    Emily Shen

      Hi,

       

      I am trying to calculate difference across years, but say one year is missing. The data is like this below

       

      YearTypeSales
      2010A100
      2011A110
      2013A140
      2014A150

       

      When I use a simple table calculation, the result in Tableau is like this

       

      calculate difference.png

       

      so even though 2012 is missing, it is calculating the difference from 2011. What I want is when prior period/value is missing, do not calculate, leave as empty or a null value. Is this possible?

      Thanks for any help!!