Tableau: Measures vs. Dimensions
*Note: Although Tableau will be used as the main backdrop for this article, measures and dimensions exist in many other data visualization tools, such as Looker or Google Data Studio.
In Tableau, there exists the concept of measures and dimensions to classify fields you can use. However, it’s easy to get the two confused when working with them. You are able to switch some fields from measure to dimension or vice versa but there is a distinct difference between the two that will affect your visualization. Let’s first start by reviewing the definitions of each term.
A measure is a field that can be aggregated in some way, such as a sum or an average. Think of it as something that can be collected, counted, or combined in some way to return a single value.
A dimension is a field that can be used to split up another field or measure into distinct groups. It can be used to define the level of detail to perform an aggregation on. For example, we can use the Sum of Sales as a measure and then use Region as a dimension field to split apart the Sum of Sales into the Sum of Sales per Region.
Notice that the measure is a green pill and the dimension is a blue pill. So do green and blue pills in Tableau correspond to measure and dimension fields? No.
Green and blue pills actually correspond to another pair of concepts in Tableau: discrete and continuous fields.
A discrete field contains values that exists only as individual, distinct values. An example could be alphanumeric employee IDs, state names, or even the finite set {1, 2, 3}. These fields are always blue.
A continuous field contains values that can exist in a range, such as the range [0, 1], which contains 0, 1, and every real numbered value in between them. These fields are always green.
It’s very easy to confuse dimensions and measures with discrete and continuous. Especially since all the dimension fields are blue and the measure fields are green when you first load in a dataset! Converting from measure to dimension and discrete to continuous can easily be done in Tableau but they will affect your visualizations and filters. Converting may give you a better visualization than your initial one though so it is encouraged to try out which combination of these parameters yields the best results. Note that you can make a continuous dimension and sometimes (but not always) make discrete measures.
To recap:
- Measures: field is aggregated
- Dimensions: splits apart another field or measure into groups
- Discrete: individual, distinct values. Always blue pills
- Continuous: ranged values. Always green bills
It’s a few terms to juggle but keep them straight and you’ll be able to make better analyses with your data visualizations in no time!