top of page

Combined Sets

Did you know you can combine Sets in Tableau? These are also called Computed Sets. What exactly is a set? According to Tableau.com "Sets are custom fields that define a subset of data based on some conditions." They can be used to drill down into your data to answer questions. You can also set up Set Actions as shown in my dashboard here.


Let's start with a use case. Using the Sample Super Store data set, we want to look at which customers have a negative Profit and high Sales. Why would we want to do that? This analysis will help us identify what Sales are possibly costing the company money, and eventually we can narrow down our search to see the products for these customers.


On a new worksheet, let us create a Scatter Plot with Sales on Columns, and Profit on Rows. Then let's add Customer Name to the Detail Marks card of our worksheet.


Then right-click on Customer Name, select Create and then select Set.



On the Set pop-up menu, click on the Condition tab and the By field button.

Select Profit as the field from the drop-down and select less than 0. Rename this set Negative Profit. Then click OK.



If you place this Set on the Filters pane, the view will now only display the customers with a negative Profit. Remove the set from the Filter marks card for now.


Now we need to create another Set on Customer Name to focus on high Sales. Right-click on Customer Name again and select the Condition tab. Select Sales for the field and enter ten thousand for the value. Rename the set as High Sales. Then click OK.



If you place this Set on the Filters pane, you will only see the customers that have a Sales greater than ten thousand. (You can place Customer Name on the Text Marks card to show the names.)



Remove this set from the Filters pane.

Right-click on the High Sales set and select Create Combined Set.



On the Create Set pop-up menu, rename the set High Sales and Negative Profit.

Select both sets in the Sets drop-down. You can see there are a couple of options for the sets in the below image;



If you select All members in both sets it will display customers in both Sets.



If you select members Shared members in both sets, it narrows down the results to only those customers that have negative Profit and Sales greater than ten thousand. Only Becky Martin and Sean Miller will display. This is the result we want. I will also show you the results from the other options.



You can select "High Sales" except shared members, the results are kind of like a Left join. This means only the customers in the High Sales set will display. It will also omit the customers that are in both Sets.



Lastly if you select Negative Profit except for Shared members, it will only display those customers with a negative Profit. Notice Sean Miller and Becky Martin are not visible.



Creating Combined Sets are a great way to explore your data.

239 views0 comments

Comments


bottom of page