Thursday, January 31, 2013

More Uses for Sets in Tableau

Today, we will talk about more uses for "Sets" in Tableau.  If you don't know what sets are, I recommend you read my previous post, Working with Sets in Tableau.  As usual, we will use the Superstore Sales sample data set in Tableau.

Scenario 1: Creating combinations of fields

Let's say you want to filter out values where "Category = Furniture" and "Region = Central."  You can create a set using "Category" and "Region", then filter the set based on that unique combination of values.  An example of this is as follows:

Step 1:
  • Create the set
Set of Category and Region
I'm not sure what affects the ordering of the fields in the set.  I do know that dragging them around in the "Create Set" window has no effect on its display.  If you don't initially get the ordering you want, keep creating sets until you get the ordering you want.  Make sure to delete all of the extra sets.  If anyone knows how to change the ordering, please comment.  I'd love to find out why.

Step 2:
  • Filter the value
Filter on Category and Region
Now, you will see that there are no values for "Furniture, Central" in the chart.
Sales by Category and Region (without Furniture, Central)
Scenario 2: Saving a subset of data

Imagine that your data is quite complex and you only want to look at a particular subset.  You could create a global filter for this, but that would affect all of your graphs.  So, let's create a set which stores a particular subset of the data.

Step 1:
  • Choose your fields.
  • Apply the filter condition you want, e.g. "Top 10"
Top 10 Products by Total Sales
Now, instead of dragging "Product Name" onto all of your charts, you can simply drag the set onto it.  I also read somewhere that using sets is more computationally efficient than using filters.  I do not know why this is, but I've tested it and it seems to be true.

I hope you found this informative.  Feel free to comment if you have any questions/suggestions.  Thanks for reading.


Brad Llewellyn
Associate Consultant
Mariner, LLC
llewellyn.wb@gmail.com
https://www.linkedin.com/in/bradllewellyn

No comments:

Post a Comment