Creating Groups in Tableau (Makeover Monday Project)
I'm currently working on a Tableau dashboard that uses New Year's resolutions data from a Makeover Monday project, and I was hoping to show a breakdown of resolutions by category. For example, a "health" category would include resolutions like losing weight or improving diet, a "social" category for spending more time with family, etc. However, the dataset only includes the resolutions themselves; there are no categories.
Fortunately, Tableau gives you a way to create your own groups for this kind of thing. Here's what I did:
- In the "Data" pane, right-click the
Resolution
field and selectCreate > Group
. - In the "Field Name" text field, enter a name like
Resolution Categories
. - Select one or more fields that should be part of a new group (e.g., "Giving up smoking", "Losing weight", etc.) and then select
Group
. - Enter a name for this new group, such as
Health
. - Repeat the above steps until you've grouped everything to your liking.
- If you'd like an "Other" groups for miscellaneous fields that don't fit anywhere else, select
Include 'Other'
. (Tableau gripes if you try to create your own "Other" group by hand.)
I also created a "Resolutions" hierarchy that nests the individual resolutions inside each group:
- In the "Data" pane, right-click the newly-created
Resolution Categories
field and selectHierarchy > Create Hierarchy
. - Enter a name like
Resolutions
and selectOK
. - Select the
Resolution
field and drag it into the "Resolutions" hiearchy, under "Resolution Categories".
Now when you drag the "Resolution Categories" field into the rows or columns shelf, you can select the plus sign (+) to show the individual resolutions.