We will be diving deeper into advanced usage of Tableau for truth and story telling.

Groups & Sets

Let’s open up the file(s) in the 02-Ins-Groups_Sets folder to get started.


Groups are all about categorizing entities based on the values that you want.

  • In the demo, we will group both Argentina & Spain as spanish-speaking countries.
  • Notice that their values will be aggregated as a group under its alias.
    • In our case, we are labeling “Spanish-speaking” to the group so that we can isolate it for analysis.

General approach

There are a couple of ways where you can group values.

School’s Method

  • Create a table with values.
  • Select the rows you want to group.
    • Hold Ctrl or Cmd to do multi-selection.
  • Right-click on one of the selected values, and there will be a menu which gives you a selection to create a group.
  • A group will be created based on your selection, and you will see the group added on the left navigation bar.
    • Rename at will by right clicking.

Alternative Method

  • Right-click on the dimension you want to group on the left navigation bar, and look for Create > Group
  • It will give you a list of values where you can assign into a group. Select those values you want and use Group to group them.

Either way works and it is down to your personal preference on how you want to group your values.


Sets are all about categorizing entities based on a set of rules and guidelines.

  • You can add distinct values and formulas to categorize your data.
  • Sets are more flexible than groups where it can be drawn from multiple dimensions or even conditions.

It is not much different from grouping if you’re selecting specific values to create a set.

However, to create a set based on rules and guidelines, you will have to specify the conditions for the set explicitly.


Let’s open up the file(s) in the 04-Ins-Calculations folder to get started.

You can derive deeper insights with your own formulas to create metrics, or even change the presentation of your visualizations through logic.

In our activity, we can created a “Revenue Color” calculated field that has the following if-else statement:

SUM([Paid Fee]) > 10000
"High Revenue"
SUM([Paid Fee]) > 5000
"Not so High Revenue"
"Low Revenue"

What does the above do?

  • We are labeling any value within the above conditions in the “High Revenue”, “Not so High Revenue”, and the “Low Revenue” bucket.
  • This can be applied to your visualization as an additional metadata, such as colors or labels.

If you do not want to write out a very long IF statement, you can consider IIF:

IIF(SUM([Rented Days])>1000, "High Rentals", "Low Rentals", "Unknown")

COUNTD is to count distinct values within a column: COUNTD([Customer Id])

Another quick way to do calculations is to use pre-defined calculations, under the option “Quick Table Calculation”.

  • Put the selected metric to “Rows”, since rows are the individual records that you want to perform calculations on.
  • Select Difference, and set it relative to the previous value.
    • This is useful especially for financial data, where you’re computing the gains and losses from previous days’ performance.


Let’s open up the file(s) in the 06-Ins-Maps folder to get started.

Maps is very simple and efficient in Tableau because they have pre-defined zip codes, states, counties, and map layers within the software. They could look up zip codes and add it as a map layer within the system where you can overlay your data points.

It does mean you’ll have to update the software often to get the latest updates.

  • As you’re plotting against the Richter scale, do use Magnitude ^ 10 to size earthquakes on the map.


Let’s open up the file(s) in the 09-Ins-Dashboard folder to get started.

We went through dashboard briefly in the previous lesson, but today we will create interactive elements on all visualizations in a single dashboard collectively.

How to create interactivity on dashboards?

  • Interactivity means you can select or filter values based on your cursor’s point and click.
  • First, create a dashboard with at least a couple of visualizations.
    • Each visualization should be on a sheet.
  • Next, under the Dashboard > Actions..., you can add an action that is shared across all visualization.
    • You can select the type of interaction such as Hover or Select, and you can select specific or all the fields to perform an action on.

Level of Detail (LOD) Calculations

Let’s open up the file(s) in the 11-Ins-LOD folder to get started.

Level of detail (LOD) calculations are all about story telling. How much detail is enough, and whether it adds value to the ideas that you’re trying to drive?

We have 2 concepts here: aggregation vs granulation

  • Aggregation means you want to showcase a bird’s eye/panoramic view of your data.
  • Granulation means you want to showcase the micro view of your data.

Essentially, you are creating calculated fields to show the aggregation or granulation with your data visualization.

In the activity, we see that there is State level data, represented by the State dimension. If I want to show the State’s profits in relation to the total profits within the United States, how should I do?

  • Create a calculated field, “National Profit”.
    • Use this expression: {EXCLUDE [State] : SUM([Profit])}
      • It means when I sum all the profits, I do not want to aggregate the values to the State level. By excluding State, it will aggregate without considering State.
        • As we selected State in our Detail for our map, it will naturally aggregate it to the state level.
      • This also represents the level of detail you want to go into.
      • If you use INCLUDE, you will add that measure to the current level of detail.
  • Create another calculated field, “Contribution to Nat’l Profit, State”.
    • The calculations will include the previous calculated field, “National Profit”.
      • SUM([Profit]) / ATTR([National Profit]) * 100
        • The Profit value is on the State level, since State is selected within Detail.
        • The National Profit would sum up every profit value, ignoring State, and it is its own value as an attribute (ATTR).
  • You will have to use SIGN() function in Tableau to correct wrongly represented negative values: https://www.melovedata.com/quick-tip-use-the-sign-function-in-tableau-for-easy-color-indicators/