top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Mastering Tableau: A Beginner’s Guide to Dimensions and Measures

In Tableau, the foundation of data visualization lies in how we work with dimensions and measures. Understanding the distinction between the two is critical for crafting insightful dashboards. In this post, we’ll break down what dimensions and measures are, how Tableau treats them, and how to leverage them for effective data analysis.

The first step in Tableau is connecting to our data. Here let’s use the ‘Superstore Sales’ dataset. After connecting to our dataset, we will get a screen that looks like this:





































The leftmost section of the Tableau worksheet is called the Data pane. This pane contains all the available fields, displayed with a green or blue icon. When I first started working with tableau, I was curious to know why some were displayed with a blue icon and some with green. So, this blog is about these blues (dimensions) and greens (measures) and the role they play in our data visualization.


Dimensions or the Blues


Dimensions in Tableau are categorical fields used to segment, label, and describe data. They are represented as blue pills in the interface when dragged into Rows, Columns, or other areas of the worksheet. This blue color signifies that the field is discrete, meaning it divides the data into distinct, individual categories or groups.

Dimensions are often placed in the Columns shelf in Tableau. When we drag a dimension to the Columns shelf, it typically categorizes our data, allowing for a breakdown by that dimension along the X-axis.


Key Characteristics of the ‘Blue Pills’:


-Discrete Fields: Dimensions are usually discrete, meaning they categorize the data into distinct, individual groups. Discrete fields create headers or labels that separate data into specific categories.


-Categorical Data: Text-based, date-based, or geographical fields that don’t get aggregated into a single value but instead are broken into individual groups.

1. Text-Based Dimensions

These are categorical fields composed of text values, often used to describe attributes of data like names, categories, or labels.

Examples from the ‘Superstore Sales’ dataset:

  • Category: This is a text-based dimension that divides products into categories like ‘Furniture’, ‘Office Supplies’, and ‘Technology’.

  • Customer Name: Another text-based dimension that can categorize sales by individual customers.

Visualization: We can create a bar chart with Category on the x-axis (Columns shelf) and Sales on the y-axis (Rows shelf) to compare total sales across different categories.

 


We can see here that Tableau is treating Category as a dimension by placing it in the blue pill.  

Text-Based Dimensions create distinct categories or labels in our visualizations, often     forming headers in charts like bar graphs or scatter plots.

 

2. Date-Based Dimensions

Date-based dimensions are used to categorize data by dates or date parts such as years, quarters, months, or days.

Example from the ‘Superstore Sales’ dataset:

  • Order Date: This date-based dimension allows us to analyze sales over time, such as by year, quarter, or month.

Visualization: We can create a line chart with Order Date as the dimension to display sales trends over time, like yearly or monthly sales performance.



Tableau will automatically recognize Order Date as a date field and often creates a time series chart, such as a line graph, to show trends over time.

By default, Tableau breaks the date down into a hierarchy (Year, Quarter, Month, Day). We can choose to display the data at different levels of detail:

Year: Aggregates data by year.

Quarter: Groups data by quarters within each year.

Month: Shows monthly data.

Day: Provides daily granularity.

 

3. Geographical-Based Dimensions

These dimensions represent geographical locations such as countries, states, cities, or regions. Tableau recognizes these fields as geographical data, enabling map-based visualizations.

   Example from the ‘Superstore Sales’ dataset:

  • Region: Divides the data into geographical regions like ‘Central’, ‘East’, ‘South’, ‘West’

  • State: This dimension allows us to break down data further into individual states across the U.S.

Visualization: We could create a map visualization with State as the dimension to show how sales are distributed geographically.



Tableau will automatically generate a bar chart showing total sales for each state. As it’s a geographical-based dimension, the Show Me panel allows us to create visualizations involving maps as shown below.


 

These different types of dimensions provide various ways to categorize and explore our data for richer analysis and visualization.


Measures or the Greens


Measures in Tableau are fields that contain quantitative data, which can be aggregated, such as profit, quantity, or sales. They are typically numerical values and represent the metrics that we want to analyze or summarize in our visualizations.

They are represented as green pills in the interface when dragged into Rows, Columns, or other areas of the worksheet. The green color means Tableau is treating them as continuous variables, allowing for smooth plotting and aggregation on a continuous axis.

Measures are often placed in the Rows shelf in Tableau. They can be summed, averaged, counted, or used in other calculations, and are generally plotted on the Y-axis in visualizations.


Key Characteristics of the ‘Green Pills’:


1. Quantitative: Measures contain numeric, quantitative data.

Examples from the ‘Superstore Sales’ dataset: ‘Discount’, ‘Profit’, ‘Quantity’, or ‘Sales


2. Aggregated by Default: Measures are typically aggregated (e.g., sum, average, count) in visualizations.


3. Continuous: Measures are often treated as continuous data, meaning they can take on any value within a range and are usually plotted on a continuous scale (e.g., on the Y-axis).


4. Dynamic: Measures change based on the dimension values they are associated with, allowing for dynamic exploration of data (e.g., summing profits per category).


5. Used in Calculations: Measures can be used in calculated fields to create new metrics or perform advanced analyses.

Example: We can create a calculated field like ‘Profit Margin’ (SUM[Profit] /SUM [Sales]*100) to measure profitability.


6. Key drivers for Analytics: They drive most of the quantitative insights and key performance indicators (KPIs) in dashboards.

 

Visualizations:


  • We can create a bar chart by dragging ‘Profit’ to the Rows shelf to see profit for each category of products (e.g., Furniture, Office Supplies). This quantifies the profit value for each category.



When we drag Profit to the Rows shelf, Tableau will automatically aggregate the measure (by default, it sums the values) and displays the aggregated value as a continuous axis.


  • Now we will see an example of using measures in calculated fields.




When we drag our calculated field ‘Profit Margin’ to the Rows shelf Tableau recognizes it as a measure and hence is represented by a green pill.

Since we have already defined SUM inside our calculated field (SUM([Profit]) / SUM([Sales]) * 100), Tableau recognizes this as a predefined aggregation and displays it as AGG(Profit Margin) in the Rows shelf to indicate that the result is already aggregated.

Tableau avoids applying additional aggregations (like SUM) to an already aggregated field to prevent double aggregation.


These key characteristics of measures make them the quantitative backbone of Tableau visualizations, representing the numbers that drive insights—whether it's sales, profit, or other key metrics.


Understanding the distinction between dimensions and measures is fundamental to mastering data visualization in Tableau. Dimensions provide the context by segmenting and grouping our data, while measures give us the quantitative values that drive insights. When used together, they allow us to create powerful, dynamic visualizations that reveal trends, patterns, and relationships hidden within our data.


In the next post, we'll explore how to convert between dimensions and measures to gain even more flexibility in our data analysis.


Thank you for reading!


Reference:


12 views0 comments

Komentarai

Įvertinta 0 iš 5 žvaigždučių.
Kol kas nėra įvertinimų

Pridėti vertinimą
bottom of page