A guide to Measures vs Dimensions / Continuous vs Discrete
Understanding the distinction between the discrete and continuous fields in the dimensions and measures fields is important as it helps in understanding how Tableau looks at your data. The classification between these two fields can have an impact on the types of visualisations that can be created and affects how they will look.
A field can be either discrete or continuous. When a field is referred to as discrete in Tableau it means individually separate and distinct. A continuous field means forming an unbroken whole; without interruption. Dimensions are the fields that cannot be aggregated meaning they are qualitative and do not total a sum, for example, region, name and date. Measures are fields that can be measured, they have a numerical value that mathematical functions can be done, they are aggregated. For example, profit is a measure because a total or an average can be calculated.
When data is imported for the first time into Tableau, it determines whether to consider a field as a dimension or a measure.
By default, dimensions are categorized as discrete variables and are presented with a small blue icon in front of the field name in the dimensions shelf. Below the dimensions shelf, is the measures shelf where Measures are categorized as continuous variables, presented with a green icon before the field name.
Tableau makes it easy to know whether a field is discrete or continuous based on the colour it is given. Green shows that a field is continuous and blue indicates that a field is discrete.
It is important to understand that these colours don’t represent whether a field is a dimension or measure. The colour coding identifies discrete vs continuous fields and not dimensions vs measures. Dimensions can be used as discrete fields or continuous fields such as dates and measures can either be discrete or continuous.
How can this affect a visualisation?
Tableau discrete fields are usually used for row and column headers. For example, when looking at profit by year, using year as a discrete field:
In this visualisation, there is a discrete header for each Year.
The continuous fields draw the axes, usually used for plotting the size of the markers. For example, when we convert the date dimension from discrete to continuous:
This visualisation shows the profit on a continuous axis of time. The dates follow a chronological order that means the order of the dates cannot be changed. However, when the date dimension is discrete as shown in the bar graph above, the order of the dates can be changed. For example, sort them in descending or of high profits with the month to the lowest profit.
When to use discrete or continuous?
The use of discrete and continuous fields can impact the visualisation that is created. A continuous date with a green colour can be used to create a trend over a continuous time. Whereas, when creating a visualisation that requires the discrete marks to be sorted, the field has to be discrete with a blue colour.