8 Replies Latest reply on Jun 27, 2012 10:37 PM by narendra.muthum

    Custom Date range options in dashboard tab

      Hi,

       

      Please help me anyone on this my requirement.

       

      One of my client asked me to give date option for "Relative Date" which they can select Last n days, last n weeks, Months, Quarters and Years.. etc..

      Now they want to have "Range of Date" option along with "Relative Date" option also.

      (For example, if they wanted to go back and look at a specific week range or days range in March, they  now lost that ability)

      If I tried to provide second date filter option tableau is not taking this.

       

      Is it possible give both combined option in final dashboard sheet which we do publish into server? or is there any other option we can do better for this?

       

      I appreciate your help if you give better solution..

       

      Thanks,

      Narendra

        • 1. Re: Custom Date range options in dashboard tab
          Vladislav Grigorov

          Hi Narendra,

           

          How about using parameters? Maybe one for start date, and one for end date to define the period. This also gives you the ability to go and filter across multiple data sources, but is for a period. Then you could leverage the parameters in a calculated field sums the real measure you want to track if the real date is within the specified range - s.th. like:

          IF [DATE] >= [START DATE] AND [DATE] <= [END DATE] THEN [MEASURE] ELSE 0 END

           

          Then in your dashboard you can show the calculated field instead of the real one, and I believe this could work. If you want also the ability to have the relative date, then probably you could use even more complex logic and probably some additional parameters to define the anchor date, and the period back, and maybe a third one to define whether you are using the relative, or absolute parameters for your filtering. You can check also the attached example, and hope this heps,

           

          Vladi

          1 of 1 people found this helpful
          • 2. Re: Custom Date range options in dashboard tab

            Hi Vladi,

             

            Thank you so much for your help.

             

            Here I have created parameters for startdate and enddate to define the periods.

            Here in your tab those are able to filter across whole data charts, but I am not able to filter using these parameters.

            Is there any thing I am missing here to use these parameter for my charts?

             

            I don't want to group them any data, my data is day wise count. So I just want to use direct startdate and enddate option.

             

            -Narendra

            • 3. Re: Custom Date range options in dashboard tab
              Vladislav Grigorov

              Could you provide a sample twbx file, so that I can have a look? Basically, if your parameters for StartDate and EndDate are of the date data type, and your dates are in a field of the same type you should have no problem in doing the math, but maybe there's something else that I'm missing in the picture. Plase attach a mockup, so that I could see into it.

               

              Vladi

              • 4. Re: Custom Date range options in dashboard tab

                Hi Vladi,

                 

                Here is the my attached file. You might see 'Relative Date' option and also Start Date and End Date parameters in dashboard sheet.

                Now I want to use both option whenever and whatever I need.

                 

                As I mentioned previously 'Relative Date' only shows Last n days, last weeks, months, quarters and years..... etc

                I want use range option if I want to see any 10 days range data also.

                 

                Thank you so much for your help on this.

                 

                -Narendra

                • 5. Re: Custom Date range options in dashboard tab
                  Vladislav Grigorov

                  How about that: I changed the visualization, not the final dashboard, but you will get the idea. I added couple of parameters, allowing you to do relative filtering anchored to the [end date], based on number of periods prior to this date, as well as absolute filtering based on start and end date.

                   

                  Hope this helps!

                   

                  Vladi

                  • 6. Re: Custom Date range options in dashboard tab

                    Hi Vladi,

                     

                    You are awesome...!! that is what I want final result.

                    But, would you please explain about 'Select period type' , 'Select relative or absolute filtering', 'Select length' and 'Date is within period?' parameters why you created and what purpose?

                    Just want to understand the steps and process for if I want to create and apply same process on other tableau files.

                     

                    Once again a huge thanks to you.

                     

                    -Narendra

                    • 7. Re: Custom Date range options in dashboard tab
                      Vladislav Grigorov

                      Hi,

                      The idea goes like that:

                      the user has to specify a period to be included in the calculation. One way to do it is by simply selecting a start and end date. The other way is by selecting an end date, and a period back relative to that point in time. This is usually achieved via the quick filter menu, but has the drawback that you cannot hav multiple data connections. The workaround is to use parameters: one to define if you go the relative/absolute path ('Select relative or absolute filtering' in our case), another for selecting the end of period, and another two to define either the starting point as an absolute date, or a period, so that Tableau can calculate the start date (for the relative to option). In a way we duplicate the logic of filters.

                      By the way you cannot have two filters on the same field on the filters shelf, but if you allow end users to access and change the filter type from the drop-down (see picture), I think you could go with the built-in quick filter functionality, unless you have multiple data sources.

                       

                      Untitled-1.jpg

                      Best,

                      Vladi

                      • 8. Re: Custom Date range options in dashboard tab

                        That's the beauty!!!

                         

                        I gotcha... Thanks you so much...Vladi.