Dynamically Set Default Values for Quick Filters in Tableau

Recently, I was helping someone with a Tableau dashboard in which an action from the first view filtered a second view.  The second view additionally had a quick filter and that quick filter set to show only relevant values.  Something like this:

But, try setting the drop down quick filter option to “Medium” and then select “Express Air”.  Notice that “Medium” never occurs with “Express Air”.  The result is all data filtered, a blank view, and the drop down filter shows “(Medium)” – it’s in parentheses to let you know that the filter value isn’t relevant.

And, I can confirm that with a quick view:


Indeed, not all ship modes use all priorities.

Now, the question arose: Can we get the quick filter to default to a certain value based on the Ship Mode selected?  That is, can we set a default value for a quick filter based on an action?

Don’t be too quick to say, “No!”  That was my first inclination.  But I was wrong… There is a way!

And I’ll tell you next time…








…Just kidding!  I’ll tell you now:


Setting Default Values for Quick Filters

Let’s say I identify the following values that I want for the defaults of the quick filter drop down based on my selection:

desired default values

Here are the steps I took:

  1. Create a field that gives me the default order priority for each Ship Mode. I could do this in the source.  I chose to do this as a row-level calculation.  It’s important that it’s row level and not aggregate, because I’ll need to eh field to be classified as a dimension (so no blending for the default either).

Calculated field to set default for each Ship Mode

  1. Make sure the field is in the view that will trigger the action. Here, I’ve just added it to the detail of the Marks card:

Add to Detail


  1. Then I create a new, separate action in the dashboard that maps Default Order Priority from the source sheet to the Order Priority field of the data source for the target:

Action Filter Options

Notice that I’ve specified the Target Filters to specifically map the Default Order Priority to the Order Priority.


After triggering the actions on the dashboard, you can look at the target view sheet and see that the Actions are applied as filters:

Action Filters in the View


So, the final trick to dynamically set and change the quick filter value is to use the Action filter as a quick filter instead of the original field.

To do this, locate the little drop down caret and use the menu to add the quick filter for the Action:

The little drop down caret

And now, you have a dynamic quick filter with default values based on the selection!  Experiment below:



19 Responses so far.

  1. Mike Klein says:

    Hi Joshua,

    Great article as always. I’m noticing that you are getting an error on the blog page from the server: https://drive.google.com/file/d/0B0k64Ucxl99-S3UzZTM0RHdXa3c/view?usp=sharing

    If this is a Tableau bug, I’d be very interested in following up.


    • Joshua Milligan says:

      Hmm… I’m not seeing it. I’ll let you know if I do (or let me know if you keep seeing it).

  2. Matt Lutton says:

    So cool; thanks for sharing Joshua!

  3. Ross Bunker says:

    You might be able to use an LOD calc like so:
    { fixed [Ship Mode] : MIN([Order Priority]) }
    to dynamically chose the ‘default’ rather than having it be a hard coded CASE WHEN calculation.

    • Joshua Milligan says:

      Yes, that would be really cool. You could even use LODs to determine the Order Priority with the most or least number of orders (or highest or lowest profit). It would be something like this.

  4. Mitesh Parekh says:

    Thanks for sharing as I was looking for something similar, I applied your approach but it didn’t work for my scenario.(your approach works otherwise).

    I did post my question in tableau forum hoping for some answers. (https://community.tableau.com/thread/196407)

  5. Emily says:

    Hi Josh! Great solution! Is there a way to only include only relevant values here as well as having the default?

  6. SKP says:

    Is it possible to show top 12 values in a filter by default and the users can pick more than 12?

    • Joshua Milligan says:

      Yes! You can use a parameter instead of hard-coding 12. That way the user can select how many to show.

  7. yvan fornes says:

    Very useful. You saved my day. Thanks Joshua

  8. David says:

    This is great. Thank you so much. I was able to select the defaults I wanted.
    Would it be possible to adjust the quick filter option list based on the category chosen? Basically, each category in my project has three or four options associated with it, and I only want the relevant ones to show.
    While I could get this dynamic filter list to work before, I end up breaking that ability when I apply your method. Any adjustments you’d recommend?

    • benmelek_admin says:

      Hmmm… I’m not sure right off. Would it be possible to post the workbook on the Tableau forums with your question? Ping me and I’d be happy to take a look.

  9. Soni says:

    is there a way to do this without action filters?

    We develop dashboard for one client and then copy it across different clients. If the value in default filter is not present for a particular client, the dashboard goes blank. We have manually select a different value in quick filter before publishing it for that client.
    if there is way to automate this, it would save a lot of time and manual effort.

    • Joshua Milligan says:

      The action filters are the only way I’ve come up with so far. I’ll definitely have another post if I find another! Or maybe someone else knows?

  10. Albert Leung says:

    Thanks for the solution here. However, I got a question for you about the filter. How people can select the rest of the option under each Ship Mode? For instance, the default value for Regular Air is Critical, how user selects the rest of the order priority in the filter? I tried your method and for some reason I see only Critical under Regular Air because of the CASE statement I think. Thank you.

  11. Himansu Pathak says:

    I wanted to default a dynamic filter with max of all values however this does not seem to be working with above approach. Currently we have all values as default which pulls a huge chunk of data from multiple partitions. we wanted it to be default to max of the field so that we can restrict data on first load. after that user should be able to select any value from filter.

    Is there any other way to implement it?

  12. Raunak says:

    Is there a way to filter the dashboard from another dashboard itself? like passing values in the url similar to how some search engines pass values? something like


Leave a Reply

Your email address will not be published. Required fields are marked *