Tableau Specialist Exam Notes — Part 4: Understanding Tableau Concepts

Dimensions and measures

Justin Dixon
22 min readMar 23, 2019

Dimension fields in the view

When you click and drag a discrete dimension field from the Dimensions area to Rows or Columns, Tableau creates column or row headers.

In many cases, fields from the Dimension area will initially be discrete when you add them to a view, with a blue background. Date dimensions and numeric dimensions can be discrete or continuous, and all measures can be discrete or continuous.

After you drag a dimension to Rows or Columns, you can change the field to a measure just by clicking the field and choosing Measure. Now the view will contain a continuous axis instead of column or row headers, and the field’s background will become green:

Date dimensions can be discrete or continuous. Dimensions containing strings or Boolean values cannot be continuous.

Tableau does not aggregate dimensions. For a discussion of the different types of aggregation Tableau can perform, see List of Predefined Aggregations in Tableau.

In Tableau queries, dimensions in the view are expressed in SQL as “Group By” clauses.

For details on converting fields between continuous and discrete, see Convert Fields between Discrete and Continuous.

How dimensions affect the level of detail in the view

The level of detail in a view refers to how granular the data is given the dimension and measure data in the view.

As you add dimensions to Rows or Columns, the number of marks in the view increases.

To understand why adding dimensions increases the number of marks in the view, do the following:

  1. Drag Segment to Columns.
  2. The status bar at the bottom of the Tableau window shows you that there are now three marks in the view:
  1. Those marks just contain placeholder text, Abc, because you are only building the view's structure at this point.
  2. Drag Region to Columns.
  3. Now there are 12 marks. Three values in Segment multiplied by four values in Region is 12.
  4. Drag [Ship Date] to Rows.
  5. The total is now 57 marks (three segments by four regions by five years is 60, but there are three combinations of the dimensions in the view for which there is no data in the data source).
  6. We could continue adding dimensions to Rows and Columns and observe as the number of total marks continues to increase. Dragging a dimension to a location on the Marks card such as Color or Size will also increase the number of marks, though it will not increase the number of headings in the view. The process of adding dimensions to the view to increase the number of marks is known as setting the level of detail.
  7. Adding a dimension to any of the following locations in Tableau affects the level of detail:
  1. The view now contains 57 separate instances of Abc—the view is all structure and no content. Rectify this by dragging Sales to Text. The view can now be considered complete:

Notes

  • In some cases, adding a measure to the view can increase the number of marks in the view. For example, if you dropped Sales on Rows in the view above, the number of marks would be 57. But if you then also dropped Profit on Rows, the number of marks would increase to 114. But this is not the same as changing the view’s level of detail.
  • The number of marks in the view is not guaranteed to correspond to the number you would get by multiplying the number of dimension values in each of the dimensions that make up the level of detail. There are multiple reasons why the number of marks could be lower. To increase the number of marks in this view from 57 to 60 in the view above, right-click (Control-click on a Mac) on one of the Date headers in the view and the date or bin headers and choose Show Missing Values. For more information about how to show missing values, see Show or Hide Missing Values or Empty Rows and Columns.

Measure fields in the view

When you drag a measure to the view, it is aggregated by default. The type of aggregation will vary depending on the type of view. You should always check the aggregation and change it if necessary. For details, see “Change the default aggregation” in Edit Default Settings for Fields. For more details about aggregation, see Data Aggregation in Tableau.

When you drag a continuous field from the Measures area to Rows or Columns, Tableau creates a continuous axis for that field.

If you click the field and change it to Discrete, the values become column headers.

Tableau continues to aggregate values for the field, because even though the field is now discrete, it is still a measure, and Tableau aggregates measures by default.

In cases where Tableau has misclassified a field as a dimension or a measure, possibly because of the data type, you can convert it and change its role. If a measure contains numbers that don’t need to be aggregated (such as a field that contains date values), you may want to convert it to be a dimension.

For related details, see Convert a Measure to a Dimension.

For details on converting fields between continuous and discrete, see Convert Fields between Discrete and Continuous.

How continuous and discrete fields change the view

Continuous and discrete are mathematical terms. Continuous means “forming an unbroken whole, without interruption”; discrete means “individually separate and distinct.”

In Tableau, fields can be either continuous or discrete. When you drag a field from the Measures area to Columns or Rows, the values are continuous by default and Tableau creates an axis. When you drag a field from the Dimensions area of the Data pane to Columns or Rows, the values are discrete by default and Tableau creates column or row headers.

Continuous fields produce axes

If a field has values that are numbers that can be added, averaged, or otherwise aggregated, Tableau assigns that field to the Measures area of the Data pane when you first connect to a data source. Tableau is assuming that the values are continuous.

Tableau displays an axis when you drag a continuous field to Rows or Columns. An axis is a measuring line that shows values between a minimum and a maximum. Rulers and analog thermometers are examples of physical objects that display axes.

Tableau must be able to show a range of actual and potential values, because in addition to the initial values in the data source, it is always possible that new values will emerge as you work with a continuous field in the view.

While there are value labels on a continuous axis (0, 0.5, … 3.0 in the following image), actual marks don’t have to align with these labels as they would with column headers. For example, in the following image, the blue bar actually extends to a value of 6.940 on the horizontal axis, not 7.0 exactly.

The number of potential values for continuous fields is impossible to anticipate. For example, if you have a field named Ratings and the initial values are 1, 3, 3.5, 3.6, and 4, that’s five distinct values. But if you drop Ratings on Rows, Tableau automatically aggregates that value as SUM (which you would then immediately change to AVG, because it’s more logical to average grades than to add them), and that would then create a sixth value (3.02) that didn’t exist until you added the field to the view. And if you then applied a filter that eliminated two of the initial values, the average would change as well, so that would be yet another value. And then if you changed the aggregation, … You get the idea. The number of potential values is, if not infinite, then certainly immense.

The fact that a field contains numbers does not automatically indicate that those values are continuous. Postal codes are the classic example: though they are often composed entirely of numbers, they are actually string values which shouldn’t be added or averaged. If Tableau assigns such a field to the Measures area, you should drag it up to the Dimensions area.

Discrete fields create headers

If a field contains values that are names, dates, or geographical locations — anything other than numbers — Tableau assigns that field to the Dimensions area of the Data pane when you first connect to a data source. Tableau treats the values as discrete.

Tableau creates headers when you drag a discrete field to Columns or Rows. The individual values for a discrete field become the row or column headings. Because these types of values are never aggregated, no new field values are created as you work with your view, so there is no need for an axis.

Discrete versus continuous fields on filters

  • When you drop a discrete dimension field on the Filters shelf, Tableau prompts you to choose which “members” of the discrete field to include in the view.
  • When you drop a Date field on Filters, the result can be a discrete filter or a continuous filter. For more information, see Filter dates .
  • When you drop a continuous measure on Filters, Tableau first prompts you to choose an aggregation for the filter, and then prompts you to specify how to filter the continuous range of values.
  • When you drop a continuous dimension on Filters (other than a Date), Tableau prompts you to specify how to filter the continuous range of values.

For more on filtering various types of fields, see Drag dimensions, measures, and date fields to the Filters shelf .

Discrete versus continuous fields on color

When you drop a discrete field on Color in the Marks card, Tableau displays a categorical palette and assigns a color to each value of the field.

When you drop a continuous field on Color, Tableau displays a quantitative legend with a continuous range of colors.

For more information about color palettes, see Color Palettes and Effects.

When you connect to a new data source, Tableau assigns each field in the data source to either the Dimensions area or the Measures area of the Data pane, depending on the type of data the field contains. You use these fields to build views of your data.

About data field roles and types

Data fields are made from the columns in your data source. Each field is automatically assigned a data type (such as integer, string, date), and a role: Discrete Dimension or Continuous Measure (more common), or Continuous Dimension or Discrete Measure (less common).

  • Dimensions contain qualitative values (such as names, dates, or geographical data). You can use dimensions to categorize, segment, and reveal the details in your data. Dimensions affect the level of detail in the view.
  • Measures contain numeric, quantitative values that you can measure. Measures can be aggregated. When you drag a measure into the view, Tableau applies an aggregation to that measure (by default).
  • Explain what kind of information dimensions usually contain

Possible combinations of fields in Tableau

This table shows examples of what the different fields look like in the view. People sometimes call these fields “pills”, but we refer to them as “fields” in Tableau help documentation.

Discrete Dimensions

Continuous Dimensions (dimensions with a data type of String or Boolean cannot be continuous)

Discrete Measures

Continuous Measures

Note: With a cube (multidimensional) data source, the options for changing data roles are limited. In Tableau Desktop, cubes are supported only on Windows.) You can change some measures from continuous to discrete, but in general, you cannot change data roles for fields in cube data sources. For related details, see Cube Data Sources.

A visual cue that helps you know when a field is a measure is that the field is aggregated with a function, which is indicated with an abbreviation for the aggregation in the field name, such as:

. To learn more about aggregation, see List of Predefined Aggregations in Tableau and Aggregate Functions in Tableau.

But there are exceptions:

  • If the entire view is disaggregated, then by definition no field in the view is aggregated. For details, see How to Disaggregate Data.
  • If you are using a multidimensional data source, fields are aggregated in the data source and measures fields in the view do not show that aggregation.

Note: You can set the default aggregation and other properties and settings for fields. For details on the many ways you can customize the fields in the Data pane, see Organize and Customize Fields in the Data Pane, Edit Default Settings for Fields, and Work with Data Fields in the Data Pane.

  • Explain what kind of information measures usually contain
  • Discrete and continuous fields

In both examples, the Sales field is set to Continuous. It creates a vertical axis because it continuous and it’s been added to the Rows shelf. If it was on the Columns shelf, it would create a horizontal axis. The green background and aggregation function (in this case, SUM) help to indicate that it’s a measure.

The absence of an aggregation function in the Quantity field name help to indicate that it’s a dimension.

  • Explain how discrete fields are displayed in Tableau

blue

  • Explain how continous fields are displayed in Tableau

green

  • Explain the difference between discrete date parts and continous date values in Tableau

Continuous Dates

Version: 2019.1 Applies to: Tableau Desktop, Tableau Online, Tableau Public, Tableau Server

You can treat a date as a continuous quantity after placing the field on a shelf. You do this by selecting one of the Continuous date options on the field’s context menu (lower list of date levels). Continuous dates draw a quantitative axis for the date values.

For example, the view below displays the sales as a function of a continuous order date and is color-encoded by category. As you can see, the color of the Order Date field changes from blue to green after it is converted to a continuous quantity.

Treating dates as a continuous quantity is particularly useful when you use Gantt bars or want to see trends using line charts as shown above.

By default, date dimensions are discrete fields for which Tableau automatically selects a date level when it is placed on a shelf. To make a date dimension continuous by default, right-click (control-click on Mac) the field in the Data pane and select Convert to Continuous. The field turns green and is automatically converted to a continuous field when you drag it to a shelf. To revert to discrete again, right-click (control-click on Mac) the field in the Data pane and select Convert to Discrete.

Aggregation

Data Aggregation in Tableau

Version: 2019.1 Applies to: Tableau Desktop

In Tableau, you can aggregate measures or dimensions, though it is more common to aggregate measures. Whenever you add a measure to your view, an aggregation is applied to that measure by default. The type of aggregation applied varies depending on the context of the view.

Change the Aggregation of a Measure in the View

When you add a measure to the view, Tableau automatically aggregates its values. Sum, average, and median are common aggregations; for a complete list, see List of Predefined Aggregations in Tableau.

The current aggregation appears as part of the measure’s name in the view. For example, Sales becomes SUM(Sales). Every measure has a default aggregation which is set by Tableau when you connect to a data source. You can view or change the default aggregation for a measure — see Set the Default Aggregation for a Measure.

You can aggregate measures using Tableau only for relational data sources. Multidimensional data sources contain data that is already aggregated. In Tableau, multidimensional data sources are supported only in Windows.

You can change the aggregation for a measure in the view from its context menu:

Aggregating Dimensions

You can aggregate a dimension in the view as Minimum, Maximum, Count, or Count (Distinct). When you aggregate a dimension, you create a new temporary measure column, so the dimension actually takes on the characteristics of a measure.

Note: The Count (Distinct) aggregation is not supported for Microsoft Access data sources, and for Microsoft Excel and Text File data sources using the legacy connection. If you are connected to one of these types of data sources, the Count (Distinct) aggregation is unavailable and shows the remark “Requires extract.” If you save the data source as an extract, you will be able to use the Count (Distinct)aggregation.

Another way to view a dimension is to treat it as an Attribute. Do this by choosing Attribute from the context menu for the dimension. The Attribute aggregation has several uses:

  • It can ensure a consistent level of detail when blending multiple data sources.
  • It can provide a way to aggregate dimensions when computing table calculations, which require an aggregate expression.
  • It can improve query performance because it is computed locally.

Tableau computes Attribute using the following formula:

IF MIN([dimension]) = MAX([dimension]) THEN MIN([dimension]) ELSE "*" END

The formula is computed in Tableau after the data is retrieved from the initial query. The asterisk (*) is actually a visual indicator of a special type of Null value that occurs when there are multiple values. See Troubleshoot Data Blending to learn more about the asterisk.

Below is an example of using Attribute in a table calculation. The table shows sales by market, market size, and state. Suppose you wanted to compute the percent of total sales each state contributed to the market. When you add a Percent of Total quick table calc (see Quick Table Calculations) that computes along State, the calculation computes within the red area shown below. This is because the Market Size dimension is partitioning the data.

When you aggregate Market Size as an Attribute, the calculation is computed within the Market (East, in the following image), and the Market Size information is used purely as a label in the display.

List of Predefined Aggregations in Tableau

Sometimes it is useful to look at numerical data in an aggregated form such as a summation or an average. The mathematical functions that produce aggregated data are called aggregation functions. Aggregation functions perform a calculation on a set of values and return a single value. For example, a measure that contains the values 1, 2, 3, 3, 4 aggregated as a sum returns a single value: 13. Or if you have 3,000 sales transactions from 50 products in your data source, you might want to view the sum of sales for each product, so that you can decide which products have the highest revenue.

You can use Tableau to set an aggregation only for measures in relational data sources. Multidimensional data sources contain aggregated data only.

Note: Using floating-point values in combination with aggregations can sometimes lead to unexpected results. For details, see Understanding data types in calculations.

Tableau provides a set of predefined aggregations that are shown in the table below. You can set the default aggregation for any measure that is not a calculated field that itself contains an aggregation, such as AVG([Discount]). See Set the Default Aggregation for a Measure. You can also set the aggregation for a field already in the view. For details, see Change the Aggregation of a Measure in the View.

AGGREGATIONDESCRIPTIONRESULT FOR MEASURE THAT CONTAINS 1, 2, 2, 3Attribute

Returns the value of the given expression if it only has a single value for all rows in the group, otherwise it displays an asterisk (*) character. Null values are ignored. This aggregation is particularly useful when aggregating a dimension. To set a measure in the view to this aggregation, right-click (control-click on Mac) the measure and choose Attribute. The field then changes to show the text ATTR:

N/ADimensionReturns all unique values in a measure or dimension.3 values (1, 2, 3)SumReturns the sum of the numbers in a measure. Null values are ignored.1 value (8)AverageReturns the arithmetic mean of the numbers When applied to a dimension, Tableau creates a new temporary column that is a measure because the result of a count is a number. You can count numbers, dates, booleans, and strings. Null values are ignored in all cases.1 value (4)Count (Distinct)

Returns the number of unique values in a measure or dimension. When applied to a dimension, Tableau creates a new temporary column that is a measure because the result of a count is a number. You can count numbers, dates, booleans, and strings. Null values are ignored in all cases.

This aggregation is not available for the following types of workbooks:

  • Workbooks created before Tableau Desktop 8.2 and that use Microsoft Excel or Text File data sources.
  • Workbooks that use legacy connections.
  • Workbooks that use Microsoft Access data sources.

If you are connected to a workbook that uses of one of these types, Count (Distinct) is unavailable and Tableau shows the message “Requires extract.” To use this aggregation, extract your data. See Extract Your Data.

1 value (3)MinimumReturns the smallest number in a measure or continuous dimension. Null values are ignored.1 value (1)MaximumReturns the largest number in a measure or in the given expression based on a sample population. Null values are ignored. Returns a Null if there are fewer than 2 members in the sample that are not Null. Use this function if your data represents a sample of the population.1 value (0.8165)Std. Dev (Pop.)Returns the standard deviation of all values in the given expression based on a biased population. Assumes that its arguments consist of the entire population. Use this function for large sample sizes.1 value (0.7071)VarianceReturns the variance of all values in the given expression based on a sample. Null values are ignored. Returns a Null if there are fewer than 2 members in the sample that are not Null. Use this function if your data represents a sample of the population.1 value (0.6667)Variance (Pop.)Returns the variance of all values in the given expression based on a biased population. Assumes that its arguments consist of the entire population. Use this function for large sample sizes.1 value (0.5000)Disaggregate

Returns all records in the underlying data source. To disaggregate all measures in the view, select Aggregate Measures from the Analysis menu (to clear the check mark).

Tableau allows you to view data in disaggregated form (relational databases only). When data are disaggregated, you can view all of the individual rows of your data source. For example, after discovering that the sum of sales for rubber bands is $14,600, you might want to see the distribution of individual sales transactions. To answer this question, you need to create a view that shows individual rows of data. That is, you need to disaggregate the data (see How to Disaggregate Data). Another way to look at disaggregated data is to view the underlying data for all or part of a view. For more details, see View Underlying Data.

4 values (1, 2, 2, 3)

You can also define custom aggregations as described in Aggregate Functions in Tableau. Depending on the type of data view you create, Tableau will apply these aggregations at the appropriate level of detail. For example, Tableau will apply the aggregation to individual dimension members (the average delivery time in the East region), all members in a given dimension (the average delivery time in the East, West, and Central regions), or groups of dimensions (the sum of sales for all regions and for all markets).

Set the Default Aggregation for a Measure

You can set the default aggregation for any measure that is not a calculated field that itself contains an aggregation, such as AVG([Discount]). A default aggregation is a preferred calculation for summarizing a continuous or discrete field. The default aggregation is automatically used when you drag a measure to a view.

To change the default aggregation:

Right-click (control-click on Mac) a measure in the Data pane and select Default Properties > Aggregation, and then select one of the aggregation options.

Note: You can use Tableau to aggregate measures only with relational data sources. Multidimensional data sources contain aggregated data only.

You cannot set default aggregations for published data sources. The default aggregation is set when the data source is initially published. Create a Local Copy of the published data source to adjust the default aggregation.

How to Disaggregate Data

Whenever you add a measure to your view, an aggregation is applied to that measure by default. This default is controlled by the Aggregate Measures setting in the Analysismenu.

If you decide you want to see all of the marks in the view at the most detailed level of granularity, you can disaggregate the view. Disaggregating your data means that Tableau will display a separate mark for every data value in every row of your data source.

To disaggregate all measures in the view:

  • Clear the Analysis >Aggregate Measures option. If it is already selected, click Aggregate Measures once to deselect it.

When Aggregate Measures is selected, Tableau will attempt to aggregate measures in the view by default. This means that it collects individual row values from your data source into a single value (which becomes a single mark) adjusted to the level of detail in your view.

The different aggregations available for a measure determine how the individual values are collected: they can be added (SUM), averaged (AVG), or set to the maximum (MAX) or minimum (MIN) value from the individual row values.

For a complete list of the available aggregations, List of Predefined Aggregations in Tableau.

The level of detail is determined by the dimensions in your view — for information about the concept of level of detail, see How dimensions affect the level of detail in the view.

Disaggregating your data can be useful for analyzing measures that you may want to use both independently and dependently in the view. For example, you may be analyzing the results from a product satisfaction survey with the Age of participants along one axis. You can aggregate the Age field to determine the average age of participants or disaggregate the data to determine at what age participants were most satisfied with the product.

Disaggregating data can be useful when you are viewing data as a scatter plot. See Example: Scatter Plots, Aggregation, and Granularity.

Note: If your data source is very large, disaggregating the data can result in a significant performance degradation.

Example: Scatter Plots, Aggregation, and Granularity

If you place one measure on the Rows shelf and another measure on the Columns shelf, you are asking Tableau to compare two numerical values. Typically, Tableau chooses a scatter plot as the default visualization in such cases. The initial view will most likely be single mark, showing the sum for all values for the two measures. This is because you need to increase the level of detail in the view.

Start building the scatter plot

Use dimensions to add detail

Try adding more fields to the rows and columns shelves

Try disaggregating the data

Start building the scatter plot

There are various ways to add detail to a basic scatter plot: you can use dimensions to add detail, you can add additional measures and/or dimensions to the Rows and Columns shelves to create multiple one-mark scatter plots in the view, or you can disaggregate the data. And, you can also use any combination of these options. This topic looks at these alternatives using the Sample-Superstore data source.

To create the initial view, follow these steps:

  1. Place the Sales measure on the Columns shelf.
  2. Place the Profit measure on the Rows shelf.

The measures are automatically aggregated as sums. The default aggregation (SUM) is indicated in the field names. The values shown in the tooltip show the sum of sales and profit values across every row in the data source.

Follow the steps below to use dimensions to add detail to the view and to disaggregate data.

Use dimensions to add detail

Follow these steps to develop the scatter plot view you created above by adding dimensions to show additional levels of detail.

  1. Drag the Category dimension to Color on the Marks card.
  2. This separates the data into three marks — one for each dimension member — and encodes the marks using color.
  3. Drag the State dimension to Detail on the Marks card.
  4. Now there are many more marks in the view. The number of marks is equal to the number of distinct states in the data source multiplied by the number of categories.

Although more marks are now displayed, the measures are still aggregated. So regardless of whether there is one row in the data source where State = North Dakota and Category= Furniture, or 100 such rows, the result is always a single mark.

Maybe this process is developing the view in a direction you find useful, or maybe you prefer to go in a different direction — for example, by adding a time dimension to the view, or by introducing trend lines or forecasting. You decide what questions to ask.

Try adding more fields to the rows and columns shelves

Revert to the original one-mark view and follow these steps to develop the scatter plot view by adding fields to the Rows and Columns shelves.

  1. Drag the State dimension to the Columns shelf.
  2. Even if you drop Continent to the right of SUM(Sales), Tableau moves it to the left of SUM(Sales). This is because you cannot insert a dimension within a continuous axis. Instead, your view shows a separate axis for each member of the dimension.
  1. Drag the Segment dimension to the Rows shelf.
  2. You now have a view that provides an overview of Sales and Profit across states and customer segments. It can be interesting to hover over the marks in the view to see tooltip data for various segments:

Try disaggregating the data

Another way to modify your original one-mark scatter plot to display more marks is by disaggregating the data.

Clear the Analysis >Aggregate Measures option. If it is already selected, click Aggregate Measures once to deselect it.

What you have actual done is to dis-aggregate the data, because this command is a toggle that was originally selected (check mark present). Tableau aggregates data in your view by default.

Now you see a lot of marks — one for each row in your original data source:

When you disaggregate measures, you no longer are looking at the average or sum for the values in the rows in the data source. Instead, the view shows a mark for every row in the data source. Disaggregating data is a way to look at the entire surface area of the data. It’s a quick way to understand the shape of your data and to identify outliers. In this case, the disaggregated data shows that for many rows in the data, there is a consistent relationship between sales income and profit — this is indicated by the line of marks aligned at a forty-five degree angle.

  • Explain why Tableau aggregates measures
  • Describe how an aggregated measure changes when dimensions are added to the view

--

--