3 Replies Latest reply on Jun 3, 2016 1:10 PM by Jeff Strauss

    Educational brain teaser - parameter quick filter

    Jeff Strauss

      Here's what I hope is a difficulty level 1 for us mere mortal desktop analysts.  It did initially challenge a few internal analysts and we did come up with a workable solution which I am happy to share in a few days.



      The scenario: You have data that has time recorded in GMT zone.  You want to adapt the viz to the locale of the users choice (via a quick filter).


      Problem: Sometimes when you pick a different filter value (i.e. EST, then CDT), the title is not adjusted to the parameter display name


      Ask: Why, and what to do about it?


      Rules: Only one parameter filter is permitted, no change in design






      P.S. The sample store data does not contain time.  So I went out to Tableau Public (afterall it's public).


      Credit for base workbook.  Thank you to Niccolo Cirone

      Edward Snowden's First 24 Hours on Twitter | Tableau Public

        • 1. Re: Educational brain teaser - parameter quick filter
          Ivan Young

          Hi Jeff,

          I might be a little slow but I'm not sure what the problem is.  EST and CDT are the same time so the axis should be the same.  It might be better to not include the standard v daylight in the param and adjust for it within the axis.  The date is 9/30 so I would use *DT by default.


          Maybe create a calculation to offset [Adjusted Date Time] by an hour depending on whether the date portion falls in Standard or Daylight time and the timezone selected isn't GMT.

          DATEADD('hour',IF  [Time Zone (copy)]!=0

          AND [Created At Date Time]>=MAKEDATE(YEAR([Created At Date Time]),3,13)

          AND [Created At Date Time]<=MAKEDATE(YEAR([Created At Date Time]),11,6) THEN 1 ELSE 0 END,DATEADD('hour',[Time Zone (copy)],[Created At Date Time]))


          Looking forward to seeing what you came up with.




          I've attached a modded workbook to demonstrate my idea but all the data falls within daylight savings time so not all cases will be tested but it seems to work fine for the data we have.

          • 2. Re: Edcational brain teaser - parameter quick filter
            Vincent Baumel

            I'm only a couple months into using Tableau, so excuse any naivety...


            As for why your problem exists, the Daylight Savings Time values have a value of 1 less than their standard counterparts. This explains why CDT is equivalent to EST, MDT to CST, and PDT is equivalent to MST. In the US we observe DST from the second Sunday in March to the first Sunday in November. Given the workbook you provided, I only see one date (September 30, 2015) which clearly fits within the confines of DST. To verify DST status in this case, this would be enough of a test:

            IF DATEPART('month', today() ) >= 3 AND DATEPART('month', today() ) <= 11

            The challenge as I see it is how to limit the parameter choices based on a calculation result (e.g. 'True' might only let you choose Daylight Time zones, 'False' might only let you choose Standard Time zones). For this, I'm not sure how I would proceed.  Fun mental exercise though!

            • 3. Re: Educational brain teaser - parameter quick filter
              Jeff Strauss

              you're absolutely correct to not see the problem.  The axis will not change, the new workbook has the title that should change and does not when changing from EST to CDT.