1 Reply Latest reply on Apr 4, 2013 10:34 AM by Joshua Milligan

    TY vs. LY Weekly Comparison

    Jesse LaBoda

      Throughout the year there are different holiday's that happen that aren't necessarily in the same week as the previous. For example the Easter holiday fell 2 weeks earlier in 2013 vs 2012. I'd like to be able to compare week 9 this year to week 11 last year, but can't figure out a easier way then writing a long formula doing the comparison's manually.

       

      Any ideas?

        • 1. Re: TY vs. LY Weekly Comparison
          Joshua Milligan

          Jesse,

           

          This is probably where a custom date lookup table (date dimension) will be helpful.  The exact structure and how you might use it would depend on the structure of the rest of your data.  I've created a simple example using the SuperStore sales demo data provided with Tableau and a very simple date table that looks like this:

           

          DateHoliday
          3/31/2013Easter
          4/8/2012Easter
          4/24/2011Easter
          4/4/2010Easter

           

          Then I blended the data to create a comparison of Sales for the week of Easter for each year (2013 doesn't exist in the Sales data).

           

          A quick table calculation gives the difference from the previous year.

           

          Regards,

          Joshua