5 Replies Latest reply on Nov 21, 2013 12:04 PM by Joshua Milligan

    dynamic dates parameter or filter

    Nilay Shah


      i have a dashboard which contains about 6 sheets and all of them have dates

      one of the sheet shows trend for 14 days sales.. all others shows day-1 sales and tickets and other measures which i have put filter on for day -1..

      my requiremnet has been changed and what i need is sheet with 14 days sales should be driver table and whateevr the date is clicked upon eveything should change

      but by default day-1 should show up and then people should be able to pick and choose days between day-14 and day -1

       

      how do always show day-1 by default when people open their dashboard without having filter for the date and once i have the filter for the day-1 then action doesnt work..

        • 1. Re: dynamic dates parameter or filter
          Joshua Milligan

          Nilay,

           

          Here is a workbook that demonstrates a technique using action filters to determine which view is shown.  By default, when nothing is selected, or when the point for yesterday is selected, then the view for yesterday will be shown.  If any other point is selected, a very-close-to-identical view is shown filtered to the date selected.


          0.png

          Regards,

          Joshua

          • 2. Re: dynamic dates parameter or filter
            Nilay Shah

            thanks Joshua ,

            i think what u have provided that is what is i need..

            however, i m having little hard time figuring out ..(new at tableau)

             

            in your worksheet u have following action

             

            but when i pull the list of the actions, i dont see it

            i only see

             

            thanks for your help

            Nilay

            • 3. Re: dynamic dates parameter or filter
              Joshua Milligan

              Nilay,

               

              The two actions are one for each sheet.  So the "Filter Yesterday" filters the "Yesterday" sheet and the "Filter Not Yesterday" filters the "Not Yesterday" sheet.  Whichever sheet you are viewing should have the corresponding action filter as well as another filter that limits the data to yesterday or not yesterday

               

              If you are still having trouble making it work in your workbook, please post a packaged workbook (with mocked-up data) and I'd be happy to take a look.

               

              Regards,

              Joshua

              • 4. Re: Re: dynamic dates parameter or filter
                Nilay Shah

                Joshua,

                i have got two actions one for yesterday and one for other days

                couple of questions,

                first how is it that yesterday shows up by default when u open up the the dashboard?

                 

                second is when u select not yesterday but any other days, how do u get blank for yesterday??

                also one more thing i noticed was in the yesterday worksheet, action is overriding the "yesterday" date filter..

                 

                i have attached my workbook with fake data.. please take a look

                 

                thanks

                Nilay

                • 5. Re: Re: Re: dynamic dates parameter or filter
                  Joshua Milligan

                  Nilay,

                   

                  I've attached your workbook (I had to pretend that Nov 16th was "yesterday", so you'll need to adjust the calculation).  Two main concepts make it work:

                   

                  1. Action filters can specify what is shown when a mark is deselected.  I chose to "Show All Values" for Yesterday, but "Exclude All Values" for Not Yesterday.

                   

                  2. When you place the views in a layout container and hide the titles, then they will collapse when there is no data.  That allows the views to be "swapped" based on which view is currently being shown.

                   

                  Hope that helps!

                   

                  Regards,

                  Joshua

                  1 of 1 people found this helpful