2 Replies Latest reply on Aug 23, 2016 1:37 AM by Alan Ramsden

    Using action filters with data partitions

    Alan Ramsden

      My data on Tableau Server is partitioned by Date, so the advice I have been given is to always filter on Date first off to make the query as quick as possible.

       

      What I want to do is look at multiple locations across multiple days. But I need to identify what locations are relevant first by looking at what ones 'appeared' on a single date.

       

      So I thought I would use an initial filter page, filtered for a single day, to return the list of locations. I then want to use an action filter to pass across those locations to my second page which has been pre filtered for multiple days. Thus giving me the locations I want across multiple days.

       

      My question (finally!) is, if I am using an action filter on a dimension that is not the partition in my data, is Tableau going to query the entire data set still (something I need to avoid)? Will the action filter on my second page be calculated *after* the dates filter on that page? Will making the date filter a context filter force it to be done before the action filter?

       

      Thanks in advance. I think I'm on 9.0.

        • 1. Re: Using action filters with data partitions
          Patrick A Van Der Hyde

          You might consider a subset of data for your initial query.. something such as locations and dates as the only two fields in a separate data source.  This would be your selection view.  Then on a second view show, add in the list of all dates and locations.  This second view will be your "answer" view and only appear when selecting a date from the first view.  See the attached example (sort of - since this has all the superstore data copied twice).  Hopefully this idea gives you ideas for moving forward.

           

          Sorry - this example is in v10 but it will work with other versions the same way as there is nothing v10 specific.  Note that you can install v10 and v9 side by side on your desktop.  To set v9 to be the default version when opening Tableau files, just reinstall the latest v9 version.

           

          I hope this helps.

           

          Patrick

          • 2. Re: Using action filters with data partitions
            Alan Ramsden

            Thanks for your response Patrick.

             

            I downloaded the workbook but it wouldn't open (I checked and I'm on 9.0.4). And I can't install v10 due to my company's restriction on employees installing software themselves!

             

            I think what you are describing is similar to what I am already doing - albeit I don't have a separate data source with just location and date.

             

             

            But I think my question is more generic anyway. It's more about understanding the order Tableau does operations in. I have seen really helpful order of operation diagrams (Paint By Numbers: Let's put some things into context - a practical introduction to Context Filters in Tableau) that show Data Source Filters are done before Context Filters, which are done before Set Filters etc. But these never seem to mention Action Filters.

             

            I am assuming Action Filters get done at the same time as other Dimension Filters (assuming that my Action filter is on a Dimension anyway). And that if I were to turn *other* filters into Context filters, it would ensure the Context filters got done before the Action filter. But I am only assuming that!

             

            I'm also interested in how Tableau processes multiple Dimension filters. What order does it do them in? Does it do the one at the top of the Filters Shelf first?


            Thanks