1 Reply Latest reply on Aug 24, 2016 11:02 AM by Ryan Shirley

    Parameter to display 15/30/45 Days

    Stephen Cavallaro

      Hello, I want to create a parameter that allows the user to see metrics for the last 15/30/45 days depending on which day range they select.

       

      thank you.

        • 1. Re: Parameter to display 15/30/45 Days
          Ryan Shirley

          There are three parts to it (you can probably combine steps 2 and 3, but for simplicity sake so you can see what is going on I will make it 3 steps):

          1) creating the parameter with those 3 options (which is quite easy)

          2) creating the calculated field, which takes the date (most likely you will be using the 'today()' function; I had to use a specific date because I was using the sample superstore data and it only has data through 12/31/2015), and then subtracts the selected parameter value.

          3) Create the calculated field to use on the filter shelf (filter for 'True' since you want sales data found between those data ranges)

           

          Now when you change your parameter it adjusts the filter on the shelf to show you the info you are looking for. Without seeing what kind of "metrics" you are talking about it's hard to put it into your context. The only thing I can do is to try and walk through it in the Sample Superstore data, so here it is in action:

          Selecting 15 as a parameter (shows start date of 12/16/2015, meaning its filtering for sales data between 12/16-12/31)

          Selecting 30 as a parameter (shows start date of 12/1/2015, meaning its filtering for sales data between 12/1-12/31)

           

          Lastly, selecting 45 as a parameter (shows start date of 11/16/2015, meaning its filtering for sales data between 11/16-12/31)

           

          Hope this helps!