4 Replies Latest reply on Feb 1, 2012 4:28 PM by April Hoy

    Using an Area Chart as a Filter

    April Hoy

      I'd like to use the area graph on this dashboard:  http://public.tableausoftware.com/views/HealthCosts/SpendingOverTime?:embed=y  to filter the bar chart below.  Specifically, I'd like to be able to click on a category of expense and have the bar chart show only data for that category.  I tried setting it up as an action but it just doesn't seem to be cooperating.  Any ideas?  I've attached the spreadsheet in case that helps.  Thanks

        • 1. Re: Using an Area Chart as a Filter
          Shawn Wallwork

          April, you will be able to use an action filter to get the behavior you're looking for once you get the data and views set up correctly. Your workbook has two problems. 1) The two charts on the dashboard don't share a common field, so there is no way for Tableau to know how to connect them. 2) The two fields you probably want to use to connect the data, namely 'Sheet3:Category of Expenses' and 'age groups:Category' are not linked and more importantly are not equivalent (they don't share the same members). If you correct these issues the action filter will work.

           

          --Shawn

          1 of 1 people found this helpful
          • 2. Re: Using an Area Chart as a Filter
            April Hoy

            I see that I was using different category names on each sheet and I've fixed that now.  I don't understand what you mean when you say the sheets don't share a common field, and that the categories aren't linked.

            • 3. Re: Using an Area Chart as a Filter
              Shawn Wallwork

              Hi April,

               

              So what I meant was you either have to have fields with the same name in both charts to establish the link (or you can go into Edit Relationships and tell Tableau which fields you want it to treat as the same). But renaming them to Category is probably easiest. So now if you look at the age group data source you'll see a little link icon to the right of Category, right?

               

              Now the filter on your dashboard actually works, it may not seem like it because when you click on most bans in the area chart the bar chart disappears. But if you click on 'Other' then the bar chart appears as you expected. So the last 'fix' you need to do is make all the members in Category on both sheet have the same names, exactly the same names. You can do this at the data source level, or you can do it using Edit Aliases. Once you get the members lined up, your viz will work like a you want. Let me know if you have any other questions.

               

              --Shawn

              • 4. Re: Using an Area Chart as a Filter
                April Hoy

                That did it.  Thanks!