1 Reply Latest reply on May 31, 2016 6:27 AM by Carl Slifer

    specific time period comparison

    tianzhen wang

      Usually I used the attached template to do the month over month comparison. But when I want to set a specific time period to compare with other specific time period, which part should I change?

       

      I attached the test data here. I want to set the Apr 26- May 25 as fake "current period", and the Mar 26 - Apr 25 as fake "previous period". Will this be possible?

        • 1. Re: specific time period comparison
          Carl Slifer

          Howdy Tianzhen,

           

          This blog post may assist you a lot with what you're trying to do: Date Comparisons in Tableau Made Easy

          I set the parameters as follows

          Analysis Type = Rolling Period

          Period Type = Days

          Period Length =  30

          Date Chooser = Custom

          Custom Date = 5/25/2015

           

          Further another way to solve what you're after is to use four parameters. One for start of period 1, stop of period 1, start of period 2, stop of period 2, etc.

          You can then use your calculations to determine if a date is between any of those intervals and call it your 'current' or 'previous'. However doing this makes it easy to overlap on accident and it requires resetting it each time you want to change a little bit. If you are using the same length periods I would recommend dropping the logic from the above blog post into your workbook.

           

          Cheers

          Carl Slifer

          InterWorks

          1 of 1 people found this helpful