1 Reply Latest reply on Jan 12, 2016 6:08 PM by Matt Coles

    How to allow users to subscribe to current week of dashboards in Tableau Server that are created using a default parameter date value?

    Gessica Briggs-Sullivan

      sr@We are using multiple HIVE data sources so we had to create a dashboard with a parameter  to link data and then filter it using one consolidated date range.

      Because of the use of default Parameters for date control, the date range provided is stuck at Dec 2nd - Dec. 9th. Of course that date range can be updated manually on the dashboard in server, but how can we provide a view that shows "the last week" for subscriptions?

      The expectation is that the data always shows the last 7 days.

       

      In the screenshot attached, all 3 views are using different extracts and the parameter is a join of all 3.....

       

      I really appreciate any suggestions for fixing this issue.

       

      Thanks-

       

      Gessica

        • 1. Re: How to allow users to subscribe to current week of dashboards in Tableau Server that are created using a default parameter date value?
          Matt Coles

          There is probably a better solution to this...but, since Tableau can't dynamically generate parameter values yet, here's the best I can come up with.

           

          For the date filter calcs in each data connection, currently you're comparing the dates in your actual data to the parameter values (I assume). So, one possible solution might be to have a new parameter called "Days In the Past Filter" or somesuch that defaults to 7. Then, change all your date filter calcs so that they evaluate whether there is a non-0 value for "Days in the Past Filter". If there is, then use that to perform the calc. If not, compare the date in the original data to the two other parameters, Journey Start Date and Journey End Date instead, and ignore the other.

           

          I'd envision they'd be Boolean calcs that went something like:

           

          IF [Days In the Past Filter] < 1  // 0 or negative numbers causes us to filter on Journey Start / End params
             AND [Actual Journey Start Date] >= [Journey Start Date]
             AND [Actual Journey End Date] <= [Journey End Date]
             THEN TRUE
          ELSEIF [Days In the Past Filter] > 0 // Positive numbers causes us to filter journeys that started no more than this many days ago
             AND DATEDIFF('day', [Actual Journey Start Date], TODAY()) <= [Days In the Past Filter]
             THEN TRUE
          ELSE FALSE

           

          The end result would be three parameter selection boxes on the dashboard. The default would filter to the last seven days, and the user would need to manually set that value to 0 (or negative) in order for the two date range params to act as filters instead. It would be a little awkward and you'd probably have to include a little note in the dashboard explaining how to use it...but it'd work.