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.
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.
From the above screenshot, you can see that the 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.
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 merge those low performed products as one. To create groups in the tableau, Please select the members you want to include in your category. Next, select the Icon present in the tooltip that represents the Group members option.
Second Approach to Create Tableau Group
Please select the members you want to include in your set by holding the CTRL or SHIFT button, and right-click on them will open the context menu. Please select the Group option.
Now you can see our newly created Group in Tableau design area
Create Tableau groups from Shapes
In our previous example, we showed you the steps involved in creating simple sets. 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.
Please select the members you want to include in the set by holding the CTRL or SHIFT button, and select the Icon in the tooltip as shown below.
Now you can see our newly created one in Dimensions pane.
Create Tableau groups from Marks that represent Multiple Dimensions
In our previous example, we showed you the steps involved in creating categories 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.
Please select the members you want to include in the set by holding the Control or SHIFT button. Here, each mark represents both English Country Name, and the Postal Code (Multiple dimensions). That’s why Icon present in the tooltip provides you with an option to select the option. For now, we are select the English Country Region Name
Now you can see the English Country Region Name Group
Let me change the option to later one
The below screenshot will show you the Scatter plot Grouped by the Postal Code, and the Country name.
Hover over any group item will open a tooltip with detailed information
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.
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.
Once you select the option, a new window will open
- Field Name: Please specify the Unique name for the category, or leave the default name. Make sure, and the name should reflect the set functionality.
- Add to: This will show the existing ones. You can use this to add the items to the existing set.
We are selecting some of the random low performed states. Please do not forget to click the Group button
Once you click on the button, a new group with a random name will create. You can use the Rename button to change the name as per your specification
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 Namegroup.
It will show you the newly created and added Group in Tableau report.
Delete Tableau Group
Right-click on the name to open the context menu for deleting the existing groups in Tableau. Please select the Delete option.