3 Replies Latest reply on Mar 11, 2016 6:09 AM by Stephane Marx

    Linked Filters

    Josh Mahar

      Hi there,

       

      I have some city data for Washington state. I am looking to make a drop down where you can choose a city (filter by city) and you will get certain stats for that city: population change, property valuation change, tax collection change, etc. Now, that's simple enough, but what I'd like to do is have another view where it will show the average of these amounts for the county in which that city is in. For example, if you click on Seattle, it will show you those values for Seattle, as well as the average of those value for King county. My problem is, I'm not sure I understand how to set it so that my county average sheet changes based on the city I choose. If I link the filters, then it just filters completely so that I only have the one value of Seattle. Is there any way to get it so that when I do a quick filter for city, it automatically changes some other filter to the county in which that city is?

        • 1. Re: Linked Filters
          Tharashasank Davuluru

          Hi Josh ,

           

          A good example for this would be a dashboard that displays information on the United States. Let’s say there’s a regional filter and a state level filter. By selecting Only relevant values for theState filter, it would first look at the Region the user selects. If the regional filter is set to the Western region, then the state-level filter will only show states from the Western region.

           

          • 2. Re: Linked Filters
            Josh Mahar

            Yes, that makes sense, but I'm actually trying to do something slightly different. Using your scenario, I'd like to have a quick filter where people can choose a state, and then, let's say they choose one from the Western region.Then on a separate sheet, I'd like it to know that the state chosen on one sheet is from the Western region, so it should only display data related to the Western region. In my case I would have someone choosing a state, to get state facts, but then there would be another sheet displaying the regional facts based on the region of the state that was chosen. In some ways its like a vlookup functionality.

            • 3. Re: Linked Filters
              Stephane Marx

              Hi Josh,

               

              The first thing you need to check is that the Filter you are using is applied to your different worksheets. It can be done easily by right clicking on the filter > apply to > selected worksheet.

              In your case I think you need to use LOD calculations (Level of Details).
              It's useful to Include / Exclude / Fix a specific Dimension value. For example the Sum of Sales per Region. Sales being the value, Region the dimension. This Tableau help can be a good start for you to understand: Overview: Level of Detail Expressions

              This tutorial: Tableau Level of Detail Calculated Fields v9 gives a good example of how it works.

              This tutorial: Tableau Level of Detail Calculated Fields v9 gives a good example of how it works.

               

               

              Please find attached a workbook with a way of using it:

              - I put region on the color card to make it more obvious

              - To Fix the sales of a region I used the LOD calculation: { FIXED [Region]: SUM([Sales])}

              - With State as a filter, when you select one you see that the sum of sales for the states selected and the sum of sales for the region it belongs to.

               

              Hope it helps!