Dimension vs Measures
In Tableau, when we are connecting to any dataset the data is automatically differentiated into two parts i.e., Dimension and Measure.Tableau worksheet view:
What are the Dimensions in Tableau?
The Dimension is an independent variable where it is just the attribute name. Tableau will treat any qualitative data or categorical information as ‘Dimensions’.Example:
In this example I am going to show you how Dimensions are different than Measures:
Drag Region into the columns shelf and Sales into the Rows shelf.
You can see how the Sales values are now divided into different regions. So, I can analyze the overall regional sales in my data.
What are the Measures in Tableau?
Measure is a field that is a dependent variable which means that its value is a function of one or more dimensions where the numerical data values are considered as measures in Tableau or quantitative information as a measure.Example:
I will provide a good example of measure here: Drag [Sales] into the Rows shelf. You can see a big bar chart created in the workspace.
Feature |
Dimensions |
Measures |
Definition |
Dimensions are Qualitative information or Data. |
Measures are Quantitative information or Data. |
Specification |
These are independent variables in Tableau. |
While measures are dependent variables. |
Examples |
These are just attribute names like region,
category, department, date, etc. which we can’t aggregate. |
These are numerical values like sales, profit,
quantity on which we can do aggregation. |
Columns or Rows shelves |
When dragged on columns or rows shelves create
headers. |
When dragged on rows or columns, it will create
axis. |
Data nature |
Dimensions are discrete fields which are
individually separate. |
Measures are continuous in nature and wholly
unbroken. |
Sort |
Dimensions can be sorted ascending or descending
order. |
Measures can not be sorted in ascending or
descending order. |
Filter |
Can filter individual elements. |
Can filter only by range. |
Level of Details |
Dimensions mostly bring a level of detail to view in tableau. |
Measures do aggregate to view. |
Hierarchy |
Hierarchy of the dimensions data can be created. |
A hierarchy of measures cannot be created. |
Color shelf |
Dimensions, when dragged in the color card, you will get
different color for each value of the dimension. |
Measures, when dragged into the color card, then the color palate will be gradient. |
Cases when Tableau misclassifies the data:
There are some data fields that are numeric types, but they need to be treated at dimensions or information.For example, if in dataset I have [Customer ID] field. Now customer IDs are always in number type. So, tableau will automatically place them into measures shelf as it finds IDs are numbers.
There would never be any value to add all customer IDs to find the total or average or any numerical transaction. So, these fields should be dimensions instead of measure.
One more such case in my mind is that when our dataset contains null values then some misclassification happens in Tableau.
Suppose when a field should be a measure but have its first entry as ‘Null’ then tableau finds this field as string type as qualitative information and put this field into the dimensions shelf instead of in measure shelf.