What is Discrete in Tableau?
If you've spent any time working in Tableau, you've likely noticed your "pills" have one of two colors: blue or green. Understanding what these colors mean is the first major step to mastering Tableau, as they control nearly everything about how your visualizations look and behave. This guide will walk you through exactly what "discrete" means in Tableau and why it's so important for building the reports you need.
What Are the "Blue Pills" and "Green Pills"?
Tableau's way of distinguishing between discrete and continuous data is brilliantly simple: it color-codes everything.
- Blue Pills represent Discrete data.
- Green Pills represent Continuous data.
Think of it like this: discrete data is made of individually separate items, like Lego bricks you can count. Continuous data is more like a flowing stream of water - it's an unbroken whole. This simple distinction drives how Tableau organizes your charts. When you drag a field onto your Rows or Columns shelves, its color tells you whether it will create labels or an axis.
Diving Deeper: What is Discrete Data in Tableau?
Discrete data fields are values that are finite, separate, and distinct. When you place a discrete (blue) pill onto the Rows or Columns shelf, it creates individual headers for each value in that field. It effectively sorts your data into distinct buckets.
Common examples of discrete data include:
- Product Categories: "Furniture," "Office Supplies," "Technology" are all independent categories.
- Regions: "North," "South," "East," "West." There's no in-between value connecting "North" and "South."
- Customer Names: Each name is a unique identifier.
- Order IDs: Like customer names, each Order ID is a separate and distinct value. You wouldn't perform mathematical calculations on them.
How Discrete Fields Behave in a Chart
Let's use a simple example. Imagine you have a dataset with sales information across different product categories.
- You drag the dimension
Categoryonto the Columns shelf. Since "Category" contains distinct string values like "Furniture" and "Technology," Tableau makes it a blue, discrete pill. - Instantly, you'll see column headers appear: one for "Furniture," one for "Office Supplies," and one for "Technology."
- Next, you drag the measure
Salesonto the Rows shelf. Tableau aggregates this as SUM(Sales) and makes it a green, continuous pill.
The result is a bar chart where the discrete blue pill (Category) has created the categories along the x-axis, and the continuous green pill (Sales) has created a value axis on the y-axis to measure the height of the bars.
The takeaway: Blue pills slice your data into distinct panes. The more discrete fields you add, the more headers you create, resulting in a more granular view.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Understanding Continuous Data for Comparison
To fully grasp what makes discrete data special, it's helpful to compare it with its counterpart. Continuous data represents values that fall within a range and have a clear order. They are part of an unbroken sequence where you can always find a value between any two other values.
Common examples of continuous data include:
- Sales: $150.25, $150.26, $150.27... there are theoretically infinite values.
- Profit: This can be positive or negative and exists on a continuous numerical spectrum.
- Temperature or Height: Measurements that can take on any value within a range.
How Continuous Fields Behave in a Chart
When you place a continuous (green) pill on the Rows or Columns shelf, Tableau creates a continuous axis for that data range. Going back to our bar chart example, SUM(Sales) on the Rows shelf created a vertical Y-axis ranging from the lowest to the highest sales value in your dataset. Tableau plots your data points against this axis, not within individual headers.
The key difference is simple: Discrete fields create labels and structure, continuous fields create axes for measurement.
The Impact on Dates: Discrete vs. Continuous
Nowhere is the discrete vs. continuous concept more important - and sometimes more confusing - than when working with dates. Tableau can treat dates as either discrete or continuous, and a simple right-click and switch can completely transform your visualization.
Discrete Dates (Blue Pill)
When you select a discrete date part (e.g., the standalone blue "YEAR(Order Date)"), you're telling Tableau to treat each year as a separate category. If your data spans from 2021 to 2023, you will get three distinct headers: "2021", "2022", and "2023".
- Use Case: Perfect for comparing aggregated totals for the same period across different years. For example, you can see sales for Quarter 1 in 2022 versus sales for Quarter 1 in 2023 side-by-side.
- Looks like: Columns for Q1, Q2, Q3, Q4 with separate lines or bars for each year.
Continuous Dates (Green Pill)
When you select a continuous date value (e.g., the standalone green "YEAR(Order Date)" choice in the context menu), you're treating the date as a point on a timeline. The years 2021, 2022, and 2023 are not distinct buckets but points along a single continuous axis.
- Use Case: Ideal for showing trends over time. The axis represents the flow of time, making it easy to spot growth, decline, or seasonality without artificial breaks.
- Looks like: A single, unbroken line chart that moves from left to right along a time axis.
To switch between them, simply right-click the date pill on your shelf and choose one from the bottom half of the menu (continuous) instead of the top half (discrete), or vice versa.
How Discrete vs. Continuous Changes Filters
The type of data you're working with also dictates the kind of filter controls Tableau gives you. This is a subtle but incredibly useful distinction.
Filtering Discrete Data
When you drag a blue, discrete pill onto the Filter shelf (like 'Region'), Tableau gives you a categorical filter. This is usually a list of checkboxes or a dropdown menu where you can select or deselect the specific members you want to include (e.g., check boxes for "East," "West," "Central," and "South").
Filtering Continuous Data
When you drag a green, continuous pill to the filter shelf (like 'Sales'), Tableau gives you a range filter. You'll be asked to define a range of values - for example, showing all sales between $1,000 and $5,000 using a handy slider. This is perfect for filtering based on a measurement or quantity.
Changing Data Types: When and Why
Tableau makes an intelligent guess about whether a field is discrete or continuous when you first connect to your data. Numbers often become continuous measures, while text fields become discrete dimensions. However, you are always in control and can override these defaults.
Here are a couple of practical scenarios where you might need to make a switch:
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Scenario 1: You need to treat numbers as distinct categories.
Imagine you have a Discount field with values like 0.0, 0.1, 0.2 - representing 0%, 10%, 20% discounts. By default, Tableau will classify this as a continuous green pill because it's a number. But what if you want to see your total sales for each specific discount bucket?
- In the Data pane, right-click the
Discountmeasure. - Select "Convert to Discrete." The pill's icon will turn blue.
- Now, drag this blue
Discountpill to the Columns shelf.
Suddenly, instead of a continuous axis, you have distinct headers for "0.0," "0.1," "0.2," etc., allowing you to directly compare sales performance for each discount level.
Scenario 2: You need to treat ID numbers as labels, not measures.
What if you have CustomerID or OrderID fields? Because they contain numbers, Tableau might import them into your Measures pane. But you'd never want to get the SUM of Order IDs - it's meaningless. These fields should be used as labels to break down your data.
- Simply find the
OrderIDfield in the Measures pane. - Click and drag it up into the Dimensions pane.
The field will automatically turn into a blue, discrete dimension. Now it's ready to be used as a header, on the Detail mark, or as a filter to look up specific orders.
Final Thoughts
Understanding the difference between discrete and continuous fields is fundamental to taking control of your visualizations in Tableau. Blue pills represent discrete data and create individual headers for categorizing and grouping info, while green pills represent continuous data and create axes for measuring numerical values. Getting comfortable with this simple, color-coded system is the key to going from struggling with the tool to making it build precisely what you envision.
Learning the ins and outs of BI tools like Tableau is powerful, but not everyone has the time to master all the nuanced clicks and settings. This is where tools like ours come in handy. At Graphed, we've made reporting as simple as asking a question. Instead of configuring pills and filters, you can connect your data sources and just ask, "Show me my sales by product category in a bar chart." Graphed generates the dashboard for you in real-time, handling the complexities in the background so you can focus on the insights.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.