1 Reply Latest reply on Nov 2, 2018 1:55 AM by Donna Coles

    Percent change year over year and previous period

    Judy Yu

      Currently, I have 6 different data sources and I am using 2 parameters as a dynamic date filter - one is 'Start Date' and the other is 'End Date'. I want to create fields that calculate the percentage change from the previous period and the same period in the previous year. ie - compare July 2018 vs July 2017 or compare June 2018 vs May 2018. I'm looking to recreate something like this - July 2018 vs July 2017:

       

       

        • 1. Re: Percent change year over year and previous period
          Donna Coles

          HI Judy

           

          I don't know what you have tried so far, or what your level of Tableau knowledge is, so I'm assuming you might be quite new to the product.  Stripping back your requirements, you can get the % difference from previous month using a quick table calculation (Quick Table Calculations - Tableau ).  A property of this is the 'relative to' field which by default is set to Previous

           

          To get the difference from the same month in the previous year, I would tackle in a couple of steps.

          1) use a calculated field to get the sales for the record 12mths ago

          2) create the % diff calc based on this

           

          Using Superstore data as an example, this tries to show what these calcs are doing.

           

          Packaged workbook in v10.1 attached with the above.  Hopefully it will set you on the right path.  It's likely you'll need to provide a packaged workbook, if you're still struggling after this.(Packaged workbooks: when, why, how )

           

          Donna