Automatically show latest data with simple user override

Version 1


    In the past I would approach this problem by creating a few parameters and some calculated fields that allowed the user to which between relative filter that showed the latest data or a user specified date. An example is my key hospital statistics dashboard that displays FYTD or MTD data through the latest date, or through a user specified date. It required me to create a parameter that would be used to determine if the date should be overridden.


    I always thought this was a little cumbersome and required too many clicks. I was playing around with a payroll report the other day and came up with a new solution. This one doesn't require calculated fields and can be accomplished with a little understanding of how action filters, context filters and "Top" filters work.


    The trick is to set the date filter to run on the top 1 maximum date. In this instance, I created a date that truncates to the beginning of the month so that I just get the maximum month. All other filters, including the action filter from the other view, need to be set as "context" so that they run before the top filter.


    So what happens is that the action filter passes a single (or multiple) dates to the bar chart, which limits the dates available to the "top" filter. Then you just set the action filter to "show all values" on deselect so that it returns to the default once the date selection is cleared.



    improved date override.png

    Tableau Version: 8.0


    Original Author:  Mark Jackson