Tableau Group

In this article, we will show you how to Create a Tableau Group with an example. For this Tableau group demo, we are going to write the Custom SQL Query against the SQL Server Data Source.

I suggest you to refer Connecting Tableau to SQL Server article to understand the Tableau configurations. The custom SQL query that we are going to use for this Tableau Groups report is:

-- SQL Query to create a Text lable in Tableau
SELECT ProdCat.EnglishProductCategoryName, 
       ProdSubCat.EnglishProductSubcategoryName, 
       Geo.EnglishCountryRegionName, 
       Geo.StateProvinceName, 
       Geo.City, 
       Geo.PostalCode, 
       Geo.IpAddressLocator, 
       Prod.EnglishProductName, 
       Prod.Color, 
       Prod.DealerPrice, 
       Cust.FirstName, 
       Cust.LastName, 
       Cust.Gender, 
       Cust.YearlyIncome, 
       Cust.EnglishEducation, 
       Cust.EnglishOccupation, 
       Fact.OrderQuantity, 
       Fact.TotalProductCost, 
       Fact.SalesAmount, 
       Fact.TaxAmt, 
       Fact.OrderDate
FROM DimProductSubcategory AS ProdSubCat
   INNER JOIN
     DimProduct AS Prod ON ProdSubCat.ProductSubcategoryKey = Prod.ProductSubcategoryKey 
   INNER JOIN
     DimProductCategory  AS ProdCat ON ProdSubCat.ProductCategoryKey = ProdCat.ProductCategoryKey 
   INNER JOIN
     FactInternetSales AS Fact ON Prod.ProductKey = Fact.ProductKey 
   INNER JOIN
     DimCustomer AS Cust ON Fact.CustomerKey = Cust.CustomerKey
   INNER JOIN
     DimGeography AS Geo ON Cust.GeographyKey = Geo.GeographyKey

Creating Tableau Group

In this example, we will show how to create a Tableau Group. To do this, first Drag and Drop the Color from Dimension Region to Rows Shelf and Sales Amount from Measures region to Columns Shelf.

Tableau Group 1

From the above screenshot, you can see that Tableau intelligence has drawn the bar chart. Let us add the labels to each bar so that we can see the total amount of sales happened for each color. For this, drag and drop the Sales from Measures region to label Field present in Marks Shelf.

Tableau Group 2

First Approach to Create Tableau Group

From the above screenshot, you can observe that there are very less amount of sales for Multi, NA, and White color products, so let us group those low performed products as one. To create groups in the tableau, Please select the members you want to include in your group. Next, select the Group Icon present in the tooltip that represents the Group members option.

Tableau Group 3

Second Approach to Create Tableau Group

Please select the members you want to include in your group by holding the CTRL or SHIFT button, and right-click on them will open the context menu. Please select the Group option.

Tableau Group 4

Now you can see our newly created Group in Tableau design area

Tableau Group 5

Create Tableau groups from Shapes

In our previous example, we showed you the steps involved in creating simple groups. This example shows how to generate tableau groups from shapes. For this, we are using the Scatter Plot that we created in our previous article. If you observe the plot, we have added the Sales Amount to Columns Shelf, Order Quantity to Rows Shelf, and Postal Code to Details field in Marks Shelf.

Tableau Group 6

Please select the members you want to include in the group by holding the CTRL or SHIFT button, and select the Group Icon in the tooltip that represents the Group members option as shown below.

Tableau Group 7

Now you can see our newly created group in Dimensions pane.

Tableau Group 8

Create Tableau groups from Marks that represent Multiple Dimensions

In our previous example, we showed you the steps involved in creating groups using marks. There are some situations where each mark represents multiple dimensions. In this example, we explain how to create tableau groups from marks that represent Multiple dimensions. For this demonstration, we are using the Scatter Plot that we created in our previous article.

If you observe the plot, we have added the Sales Amount to Columns Shelf, Order Quantity to Rows Shelf, English Country Name to Color Filed, and Postal Code to Details field present in Marks Shelf.

Tableau Group 9

Please select the members you want to include in the group by holding the Control or SHIFT button. Here, each mark represents both English Country Name, and the Postal Code (Multiple dimensions). That’s why Group Icon present in the tooltip provides you with an option to select the option. For now, we are select the English Country Region Name

Tableau Group 10

Now you can see the English Country Region Name Group

Tableau Group 11

Let me change the option to later one

Tableau Group 12

The below screenshot will show you the Scatter plot Grouped by the Postal Code, and the Country name.

Tableau Group 13

Hover over any group item will open a tooltip with detailed information

Tableau Group 14

Create Tableau Group from Dimensions Pane

In this example, we will show you how to create a Tableau Group from dimensions pane. To do this, Drag and Drop the State-Province name from Dimension Region to Rows Shelf, and Sales Amount from Measures region to Columns Shelf.

Tableau Group 15

To create tableau groups from dimensions pane, Please select the Dimension on which you want to create the group, and then right-click on it will open the context menu. Please select Create option and then choose Group.. option from the context menu.

Tableau Group 16

Once you select Group.. option, a new window called Create Group will open

  • Field Name: Please specify the Unique name for the Group, or leave the default name. Make sure, and the name should reflect the set functionality.
  • Add to: This will show the existing groups. You can use this to add the items to the group.
Tableau Group 17

We are selecting some of the random low performed states. Please do not forget to click the Group button

Tableau Group 18

Once you click on the Group button, a new group with a random name will create. You can use the Rename button to change the group name as per your specification

Tableau Group 19

Next, click Apply, and click OK button to close the window. That’s it; we successfully created our Tableau Group from the dimension pane. Let us replace the State Province Name from Row shelf with State Province Name (group)

Tableau Group 20

It will show you the newly created and added Group in Tableau report.

Tableau Group 21

Delete Tableau Group

Right-click on the Group name to open the context menu for deleting the existing groups in Tableau. Please select the Delete option.

Tableau Group 22