In Tableau, we can combine together some of our datapoints into groups and sets.
Groups are the simpler of the two, and combine several datapoints together into a unit that can itself be treated as a datapoint. For example, if we have data on animals, and want to treat hamsters, mice, and guinea pigs as a single unit (rodents), we can combine them into a group. Groups can be created by highlighting datapoints on a graph and selecting the paperclip icon.

They can also be created by right-clicking a field and selecting Create > Group.

We can then select the items we want to combine, group them together, and give the new group a name.

We can use this grouped field in visualisations to display data at a broader level of categorisation. As well as creating logical groups such as 'rodent', this can be used to combine functionally identical items that are distinct in the dataset (for example, spelling variations of the same item), or to group items we aren't focused on into an 'other' group.

While groups are manually selected, sets can be dynamic and rule-based. The interface for creating sets can be identified in a similar way to groups, through the field drop down.

Dynamic rules can determine whether a datapoint falls in a set. For example, if we want to consider only the three most popular pets, we can use a rule referencing a different field:

These rules are dynamic (unlike groups), meaning if new data is introduced and the top three pets changes, presence in this set will change. For more information about using sets in Tableau, you can look at these blogs:

