1 Reply Latest reply on Feb 6, 2019 3:29 PM by Peter Fakan

    Create subgroups from data filter; multiple filters at once

    Everett P


      I'm a newbie to Tableau and am trying to figure out how to do a few of things:


      1) I have a large data set indicating race categories. I'd like to organize the field so that I can group ethnic/racial categories together and filter accordingly. For example, how do I create an "Asian/Pacific Islander" list that includes the sub-items I need ("Burmese", "Indian," etc.) and a separate "White", "Black" etc. list each inclusive of its respective subcategories? 


      2) After creating the lists I want the end user to be able to see the detailed categories: so I need them to be able to Filter "Asian/Pacific Islander" and then see all of the subgroups included. When they toggle "White" I'd like them to be able to see all the subgroups included, etc.


      3) Ultimately, I'm trying to create a bar chart that filters both by race/ethnicity and by year (I'm showing how makeup has changed over time). You'd be able to click on the "Year 2000" and "Asian Pacific Islander" and see the numbers of subgroups that lived in the state in that year. Then you could click "White" and see the subgroups for the year 2000. Or, you could change the year... etc.


      Many thanks in advance!

        • 1. Re: Create subgroups from data filter; multiple filters at once
          Peter Fakan

          Hi Everett,


          Just create a calculated field;


          Ethnic Group

          if [race] = 'Maori' then 'Polynesian'

          elseif [race]= 'Tongan' then Polynesian'

          elseif [race]= 'White' then 'European'

          Else 'the filter needs to be looked at'



          The Else will error-trap anything else coming into the dataset, or if you have a 'Other' category I'd put them there.


          Then in your viz, you simply use the calculated field instead of the original field.