For A Beginner, By A Beginner - Grouping

by Alex Harrison-Wood

This blog post is all about groups within your data, and what you can then do with them.


For this example we are, as always using the Tableau sample Superstore dataset. Start by dragging “Orders” into the main pane and go to a new worksheet.

Drag both “Country” and “State” onto either the rows or the columns shelf. We need Country as depending where in the world you are, your tableau may be set to try and assign “State” to your local country. Next drag “Sales” to the remaining shelf (either row or column), you should see a long bar chart with sales for each of the 50 states (and the District of Columbia). Now we can either go the long way around and bring longitude and latitude into the view, or we can simply press “Show Me” in the top right of the page and, in this case, select the filled in map (not the one with spots…). You will notice that Country, State, and Sales have moved down into the marks card on the left, and Longitude and Latitude have taken their places in the rows and column shelf (if you know all this bear with me, I’m going through it just in case).


Now, drag a lasso around a few states, lets say the eastern seaboard, then just let you mouse hover over the selected states for a moment. The tooltip will expand to include the options “Keep Only”, “Exclude” and so on. The one we are interested in is the paperclip, if you press that and then “State, County” it will group those states together, as shown in the card on the right hand side. If you right click that group, and select “Edit Alias” you can name rename it, for instance “Eastern Seaboard”. Now if you select another group of states, either by dragging a lasso over it or pressing “Ctrl” and clicking on them, and pressing the paperclip again, it will group those in the same panel on the right. Again rename this new group something you will remember. Now we can continue grouping states, but it unnecessary for this example. If you look over to the data pane on the left you will see that, under dimensions, there is a new entry called “Country & State (group)”, we can rename that too by right clicking and pressing rename, lets call it “New Regions”. If we create a new worksheet, drag “New Region” and “Sales” onto the row and column shelves, the view will produce a bar chart of sales for these regions only, which can be very helpful if you need to view a continuous measure, such as sale, over an area that has a greater granularity than you require.


Now this was a slightly longer way around than necessary, if we simply dragged “Country” and “State” into the view at the beginning we could have just selected and grouped the states then, however this way helps to explain it a little better.

This method is not limited to geospatial factors, we could for instance group the individual values of “Product Name” by say “Printers”, “Bins” and “Folders”, it just provides a quick and easy way to view exactly what part of the data we want to focus on.


Anyway, that’s all for this one!



Alex Harrison-Wood

Mon 20 Aug 2018

Thu 16 Aug 2018

Wed 15 Aug 2018

Tue 14 Aug 2018