1 Reply Latest reply on Jul 24, 2016 7:19 AM by Yuriy Fal

    Year over Year / Quarter over Quarter comparison for Last x Weeks data

    Manoj Sundar

      Hi,

       

      I am fairly new to Tableau and finding it challenging to create a view for the below requirement. Kindly help me out here.

       

      Requirement:


      I want to build a view that will let me display data from the last X weeks (where X is an integer chosen by the user via a parameter) and compare it with the same group of weeks belonging to previous years' or quarters'. For example,

       

      If user chooses last 3 weeks and 'Year' view, the view must display the sum of the past three weeks sales data in the current Year, the same 3 week sum from the previous Year, Year-2, etc.

      If user chooses last 3 weeks and 'Quarter' view, the view must display the sum of the past three weeks sales data in the current Quarter, the same 3 week sum from the previous Quarter, Quarter-2, etc.

       

      The datasource is similar to the Sample SuperStore data.

       

      Regards,
      Manoj.

       

       

       

      Output of what I want:

       

      Last X weeks: 10

      View: Year

       

          

      Region2016201520142013
      Americas500450350300
      Europe400350250200
      Asia300250200100
        • 1. Re: Year over Year / Quarter over Quarter comparison for Last x Weeks data
          Yuriy Fal

          Hi Manoj,

           

          Could you please tell more about your meaning of "Last N Weeks"?

          Does it translate to a N*7 days from TODAY() moving window,

          or may be it does mean three particular Week numbers including the current one?

          The answer (and the view complexity) could be different depending on the definition.

           

          For anyone to help you with the solution,

          please, do not hesitate to post your try (as a workbook).

          It could ease answering a lot.

           

          And please, don't worry for it to be a total miss.

          We're all learning from each other here.

           

          Yours,

          Yuri