5 Replies Latest reply on Dec 3, 2015 3:39 PM by Erin Gehn

    Default Date within Filter

    Erin Gehn


      Within my workbook, I have a date that I would like to preset as today.

      I used the calculation Start.Date=TODAY() and set this condition to TRUE.


      The first time I used this, it seemed to work super well, so I applied this to all of the workbooks with a start date.

      Now, I am going back to these workbooks and finding that the conditions did not hold up. Instead of displaying today, they display the date that the workbook was set to the abovementioned condition. AND the condition filter is automatically reset to FALSE.


      Is there a way I can make this work? I just want the start date to always display <TODAY()>'s value.

        • 1. Re: Default Date within Filter
          Rody Zakovich

          Hello Erin,


          That is strange, but I wanted to ask...


          Instead of using a calculated field (I.e [Date] = TODAY()), why not just drag [Date] onto your filter shelf and use a relative date set to today?


          10-7-2015 10-54-52 AM.png


          10-7-2015 10-55-26 AM.png




          • 2. Re: Default Date within Filter
            Erin Gehn

            Will this keep only dates that are today?


            The reason I have kept it a discrete date field is because we want users to be able to see the default of today upon opening the workbook, but then have the ability to manipulate the date to another specific day.


            ((Side note:: we have some date fields set up as parameters instead of the above mentioned filters. Would these undergo a completely separate process for setting a default of today? Is this considered an example of the dynamic parameter?))

            • 3. Re: Default Date within Filter
              Rody Zakovich

              Hello Erin,


              Yes that will keep dates that are only today.


              To your second point, what I have done in situations like this is create a "Select Range" parameter, and a "Select Date" date parameter


              Select Range =>


              Select Date


              Select Date Parameter =>

              10-7-2015 11-12-34 AM.png


              This allows the user to type in whatever day they need to see. In addition, this avoids me having to manually update the Date list everyday....


              I then tie these two parameters into a calculated field


              IIF([Select Range] = 'Today'

                  , [Date] = TODAY()

                  , IIF([Select Range] = 'Select Date'

                      , [Date] = [Select Date]

                      , FALSE )



              Put that onto your filter shelf and select true.


              This checks to see it the First Parameter (Select Range) is set to 'Today', if it is, then my Date must equal today. If, however Select Range is set to 'Select Date', then my date must be equal to the Select Date Parameter.


              Your user will have to toggle from Today to Select Date in the Parameter, but it gives you the functionality you are looking for (I hope).




              • 4. Re: Default Date within Filter
                Ken Schiele

                I built the attached .twbx using a modified SuperStore data set (dates through 2016!) that implements this solution.


                A Boolean Parameter is used to allow the customer to base the filtered date range on Today' date (TRUE) or use the Start/End dates from the Parameter.


                This is a pretty clever way to address this need to default to today AND allow user control over Start-End filter dates.


                And a Hat-tip to the presenter of the TC15 Session - Risky Business No More at Axis Capital: Enterprise Analytics in the Insurance Industry - for the details on how they did this!

                • 5. Re: Default Date within Filter
                  Erin Gehn

                  Thank you for working with me on this!!


                  If you had not prompted an explanation of the issue as deeply as you did, I don't think I would have seen that I already knew a solution.



                  THANK YOU