2 Replies Latest reply on Aug 23, 2017 7:57 AM by Bryce Larsen

    Formatting Date Filter

    Dan Gordon

      Hello,

      Hope everyone's summer is going well.

      Quick question.  Trying to format a date filter.  The field is set to display Quarters only:

      However, when you try to select either the beginning or ending date, the dropdown defaults to a calendar view.  This allows someone to select only a partial quarter.  While this is a training issue, it still confuses some executives and can result in incorrect visuals being shared.  Is there a quick way to format this/correct this?

      Thanks everyone for your assistance/guidance.

       

      Dan

        • 1. Re: Formatting Date Filter
          Jeff James

          Dan,

           

          This might be better asked in the general forums since it isn't really a healthcare question. That said, rather than using the raw date for the filter, you can use a calculated field at the quarter level. Something like this:

           

          date(DATETRUNC('quarter',[Date]))

           

          That can be placed on the filter shelf instead of using the raw date. You can continue to use a relative date filter or you can switch to multi-select list. If you use the relative date, the user will always get a full quarter, but it will start from the following quarter because the date is truncated to the first day of the quarter.

           

          To combat that issue, you can use a more complex calculation to resolve the date to the last date of the quarter:

           

          date(dateadd('day',-1, dateadd('quarter',1, DATETRUNC('quarter',[Date]))))

           

          An example file is attached.

          • 2. Re: Formatting Date Filter
            Bryce Larsen

            Continuing from Jeff's point, I think the only 'true' solution for your request is to change to parameters dropdowns with year/quarter separate and use a calculated field as a filter instead.

             

            Having said that, echoing what I believe you alluded to and what Jeff mentioned, we usually still use calendar dates and truncate it to the measure of time we care about (quarter in this case).

            I enjoy using a series of parameters as to default the dashboard to the most recent date in the dashboard and a few set ranges for the users to use. Perhaps this could be useful depending on your use case? Image attached.TableauDateParams.png