1 Reply Latest reply on Jan 18, 2017 8:05 AM by Jamieson Christian

    Multiple Quick Filters on multiple data sources via relationships

    Ronald Holtshausen

      I am using Tableau 10 and am making use of the new relationship feature between data sources.

       

      Presently I have data connected from three data sources (separate MSSQL Tables), each source shares the common column Vendor. i.e:

       

      Table 1 - Data Source to  Worksheet A

           Vendor,      State,      Amount,     Paid_Status

       

      Table 2 - Data Source to  Worksheet B

         Vendor,      Category,     Date_Active

       

      Table 3 - Data Source to  Worksheet C

        Vendor,     Employees

       

      At the moment I have the workbook configured with three worksheets A, B and C, each drawing fields and data from one of the three tables. (See above)

       

      The main worksheet (A) has a quick filter on the Vendor field, which when activated filters all the remaining worksheets (based on the data source relationships configured between the common Vendor column).

       

      My question relates to adding a second filter that would filter the remaining worksheets. i.e.

      In Worksheet A I would like to add the additional filter of State.

       

      When selected the state filter would filter the Vendors quick filter for those vendors located in that state, and thus update Worksheet A  B and C to show only vendors from that state.

       

      I have seen many answers related to the use of "Only Relevant Values" for the secondary filter (in my case state) this restricts the filter list/options but does not action the filter and hence the other worksheets do not get filtered.

       

      Thanks in advanced

        • 1. Re: Multiple Quick Filters on multiple data sources via relationships
          Jamieson Christian

          Ronald,

           

          I think I see what you are saying, but let me repeat it to make sure I have it down.

           

          • If you have two filters from the same data source, and one is configured to show "Only Relevant Values", then it will change in response to the other filter.
          • BUT if you have a filter from a secondary data source, that is configured to apply to "All Using Related Data Sources", and a filter on the primary data source that is configured to show "Only Relevant Values", the latter will not show only relevant values in response to a change to the filter from the secondary data source.

           

          I was able to reproduce this scenario on a Superstore test.

           

          1. Set up 2 copies of the Superstore data source in a workbook.
          2. On the first sheet, add [State] and [Segment] (from the first Superstore) to the filter shelf.
          3. Set up [Segment] to show "Only Relevant Values".
          4. On a second sheet, add [Segment] (from the second Superstore) to the filter shelf, and set it to show "Only Relevant Values".
          5. On the first sheet, configure the [State] filter to apply to "All Using Related Data Sources".
          6. Show all filters on both sheets.
          7. On the first sheet, set the [State] filter to show only "Maine".
          8. On the first sheet, [Segment] will only show "Corporate" and "Home Office", because Maine does not have any "Consumer" sales.
          9. But on the second sheet, [Segment] will still show all 3 options.

           

           

          So what happens if you take [Segment] from the first sheet and have it apply to "All Using Related Data Source" as well? Does that fix the problem? Unfortunately, it does not. Even though it seems like it's the same filter, it does not show "Only Relevant Values" when applied to sheets using a related data source. (In truth, it's not the same filter — it's a counterpart in the related data source — but we would still expect it to behave the same as though we had specified the counterpart directly.)

           

           

           

          The only thing I found that did work was to take the filter that drives the "Only Relevant Values" on other filters, and make it a Context Filter. Then you can use either "Only Relevant Values" or "All Values in Context". Even then, it only affects relevant values for filters that are not based on a related data source. In other words, in the example above, the [Segment] filter in Sheet 2 needs to come from Superstore 2, and not from the related Superstore 1 filter.

           

           

           

          I hope that helps!