Sets

A set in Tableau defines a collection of records from the data source. At a row-level, each record is either in or out of the set. There are two types of sets:

  • Dynamic sets (sometimes called Computed or Calculated sets)
  • Fixed sets

A dynamic set is computed for a single dimension based on a conditional calculation you define. As the data changes, the results of the condition may change and records may switch between in to out of the set. For example, if you were to use the drop-down menu on the Customer Name in the data pane and select Create | Set, then you could stipulate a condition that defines which records belong to the set:

In this example, we've created a dynamic set named Customers who purchased more than $100 with a condition that's set by the Sum of Sales being greater than 100. You'll notice that there are also options for computing by formula or Top N. All of these conditions are going to be at an aggregate level (across the entire dataset or across the context if context filters are used) and then each record is evaluated as to whether it is in or out of the set. In this case, the total sales for each customer will be computed across the dataset and then each record will be counted in or out of the set based on whether the customer for that record has total sales greater than $100.

A fixed set is a list of values for one or more dimensions. If the values for a single record match the list defined by the set, then the record is in the set and out otherwise. For example, you might create another set based on the Customer Name field, this time with the General tab:

Here, you can select individual values that will define what is in or out of the set. Note the option to Exclude rather than include values. In this case, we've created a set named Customers with the first name of Aaron. Any records that have a Customer Name that matches one of the 6 values we selected will be in the set. All others will be out. Because this is a fixed set, the values are not ever calculated or recalculated. If records with a customer named Aaron Burr show up in the dataset next week, they will still be out of the set.

As we'll see in the following example, set actions operate on fixed sets.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset