Using Groups in Tableau
A quick tutorial on grouping data in Tableau Public.
Using groups in Tableau can be an easy way to clean and differentiate your data. For example you may have data coming from different countries and you’d like to group countries to their respective continents. With groups you can divide fields however you’d like and increase the readability of your visualization.
For this example I’ll be using a public dataset found here: https://catalogue.data.govt.nz/dataset/effects-of-covid-19-on-trade/resource/6d411b54-3ab4-4aeb-981d-b41df81afbfa. This is data of COVID-19’s effect on international trade. There are several different countries and regions included. I’ll be grouping these as “Western” or “Eastern”. To begin we will go into the data source shelf and click the arrow on the side of the “Country” field. There will be a drop down menu where you can select “Create” and then select “Group…”.
You should now see a group creation window with all the countries (or respective data from your field) and be able to select and group them together. Once you’ve made your selections for a group, you can click on “group” and you will be prompted to name that group. Make sure to hold ctrl or command when selecting multiples.
Once you are satisfied with your grouping you can click “ok” and Tableau will create a new calculated field with your groups. In this example I’ve dragged and dropped the new calculated field “Country (group)” onto the axis of the “Country” table to get an elegantly divided and descriptive table.
Grouping in Tableau can be very handy when working with “messy” data or larger fields with lots of rows that could use some separation.