6 Replies Latest reply on Nov 29, 2018 12:53 PM by Dinesh Parthiban

    Auto Update Date Filter Slider

    Dinesh Parthiban

      Hi,

       

      I have a line chart having dates from 2017 to 2023 (the axis is on month), more dates either earlier than 2017 or past 2023 can be added by end user at any point. The view just needs to default to rolling 12 month period. Though we default the view to just 12 month. User should have the ability to move the slider start and end date to view any range they like.

       

      I am using a "Date Slider Filter" on Month (Continuous) as the filter and Range of Date as the slider control. At present i am manually sliding the start and date end every month.

       

      Can we automatically update the start date on slider filter to current month and end date as a rolling 12 months?  (next month the slider should auto update to Dec/18 to Dec/19)

       

      Thanks.

       

      (Edited to have more clarity on requirement)

        • 1. Re: Auto Update Date Filter Slider
          Paul Wachtler

          Hi Dinesh,

           

          You can use the "Relative dates" filter functionality to set your filter to show the last 12 months of your data.  Once a new month of data is added, it will update.

           

          Screen Shot 2018-11-23 at 4.49.51 PM.png

           

          Read more about it here:

          Quick Start: Relative Date Filters - Tableau

           

          Best,

          Paul

          1 of 1 people found this helpful
          • 2. Re: Auto Update Date Filter Slider
            Dinesh Parthiban

            Hi Paul,

             

            The requirement is to have a date slider. I cannot work backwards because the max date is not constant, new dates may be added at anytime. It needs to work by moving forward from current date. The goal is to auto update the existing  slider start date to current month and end date as after 12 month.

             

            Thanks.

            • 3. Re: Auto Update Date Filter Slider
              Akram Ebrahim

              Hi Dinesh,

               

              Please find the attached twbx file. I have completed your requirement with superstore database.

               

               

              This approach will dynamically detect the max date month and will show only last 12 months.

              The silder will also automatically gets updated to 12 months.

              Hope this helps!

              2 of 2 people found this helpful
              • 4. Re: Auto Update Date Filter Slider
                Dinesh Parthiban

                Hi Akram, This is awesome but i see 2 problem in this. They are:

                 

                1. I have dates from 2017 to 2023 and more dates will be added at some point. Working backwards and having a hard <=12 months will not work because the max date is not constant. I need the have the starting date as current month and work it way forward to 12 months in future

                 

                2. The rolling 12 month Boolean restricts me only within the 12 month time frame, i cannot toggle filter to see the past or the future dates. Though we default it to rolling 12 month time frame user should be able to slide and see any dates they want.

                 

                Thanks!

                • 5. Re: Auto Update Date Filter Slider
                  Akram Ebrahim

                  Hi Dinesh,

                  Question 2:

                  we use parameter as user provision to select months they can toggle between.

                   

                   

                  Now based on this parameter I'm controlling the previous months dynamically

                   

                  Then I have modified the Rolling months calculation as below:

                   

                   

                   

                  Last 6 Months:

                   

                   

                  Last 14 Months:

                   

                   

                  Question 1:

                  For your question number 1 we have to add the calculations as below.

                   

                  Current Month( To get the current date's month):

                   

                  Then modify the rolling months calculation as below: ( As of now i dont have data more the 2017, you can check with your future dates file)

                   

                   

                  Hope this helps!

                  1 of 1 people found this helpful
                  • 6. Re: Auto Update Date Filter Slider
                    Dinesh Parthiban

                    Hi Akram, Thanks for the workbook. But as i mentioned in my previous comments is there away to move month forward. The attached dashboard is basically "Past x month". I want a rolling 12 month from current month. Example: Nov/18 to Nov/19.

                     

                    Also is it possible to do it in a slider? so that user can override the default 12 month and if they want previous 8 months plus rolling 12 months aka 20 months (03/18 to 11/19) they can use that.