How to Bin Data in Tableau

Cody Schneider8 min read

Dealing with a continuous range of numbers in Tableau, like individual sales figures or user ages, can make a chart look messy and hard to read. That’s where bins come in. Binning is a powerful feature that lets you group continuous data into smaller, manageable chunks, turning a noisy visualization into a clear and insightful story. This guide will walk you through exactly how to create and use bins in Tableau, from the automatic method to more advanced custom groupings.

What Are Bins in Tableau (And Why Should You Care)?

Imagine you have a spreadsheet with the exact test score for 1,000 students, from 0 to 100. If you try to create a bar chart showing how many students got each exact score, you’d end up with a cluttered chart of up to 101 tiny bars. It would be nearly impossible to spot any real trends.

Bins solve this by grouping those values. Instead of looking at scores of 91, 92, 93, etc., you could group them into letter grades: A (90-100), B (80-89), and so on. In Tableau, these groups are called bins. Bins essentially convert a continuous measure (a field with a green pill) into a discrete dimension (a blue pill), making it perfect for categorizing your data.

So, why should you use them?

  • Simplify Complex Data: Bins declutter your visualizations by summarizing a wide range of values into a few easily readable groups.
  • Identify Distributions: They are the fundamental building block for creating histograms, which show you how your data is distributed. You can quickly see if your data is skewed, where it clusters, and identify outliers.
  • Create New Categories for Analysis: You can use bins as a dimension to segment other parts of your data. For example, you could analyze customer behavior by age group (20-29, 30-39, etc.) instead of by each individual age.

At its core, binning turns a long list of numbers into a structured, categorized view that helps you and your audience understand the bigger picture.

How to Create Bins with Tableau's Default Feature

The fastest way to create bins is by using Tableau’s built-in functionality. It’s an intuitive process that only takes a few clicks. Let's use the Sales measure from Tableau's Sample - Superstore dataset as an example.

Step 1: Locate Your Continuous Measure

First, find the measure you want to group in your Data pane on the left side of the screen. Measures are typically numerical fields like Sales, Profit, Quantity, or Age. You'll know it's a measure because Tableau lists it under the "Measures" section and it will likely have a number (#) icon next to it.

For this walkthrough, we will use the Sales field.

Step 2: Open the 'Create Bins' Dialog Box

Right-click (or control-click on Mac) on the measure you want to bin. From the context menu that appears, navigate to Create and then select Bins.... This will open the 'Create Bins' configuration window where you'll define the structure of your groups.

Step 3: Configure Your Bin Size

The 'Create Bins' window gives you options to name your new field and, most importantly, set the bin size.

Here’s what you’ll see:

  • New field name: Tableau automatically suggests a name, usually your original field name plus "(bin)". It's a good practice to keep this naming convention for clarity, but you can change it if you wish.
  • Size of bins: This is the most important setting. It determines the interval for each group. For example, if you set the size of your Sales bins to 250, Tableau will create groups for $0-$249, $250-$499, $500-$749, and so on.

Tableau often suggests a default size based on the range of your data. For our Sales data, let's set the Size of bins to 100. This means each bin will represent a $100 increment. Once you've set the size, click OK.

Step 4: Locate Your New Bin Dimension

After clicking OK, look back at your Data pane. You'll see a new field under Dimensions named Sales (bin). Notice it has a histogram icon next to it and is a blue pill. Tableau has successfully converted your continuous measure into a discrete dimension that you can now use to build visualizations.

Putting Bins to Work: Building a Histogram

The classic use case for bins is building a histogram to see the frequency distribution of your data. Following our previous steps, building one is now incredibly straightforward.

Step 1: Drag Bins to Columns and Records to Rows

Click and drag your new Sales (bin) dimension from the Data pane onto the Columns shelf. Since the bin field is discrete, Tableau will create a header for each bin value across the top of your view.

Next, you need to count how many orders fall into each sales bin. A simple way to do this is to drag the Count of Orders measure (or drag the Orders table itself to Rows and set its aggregation to Count) onto the Rows shelf.

Just like that, you have a histogram! Each bar represents a $100 sales bin, and the height of the bar shows how many orders had a sales value within that range. You can immediately see that the vast majority of orders have sales under $100.

Step 2: Show Missing Values (Pro Tip)

Sometimes, a bin may contain no data. By default, Tableau might skip displaying it. To ensure your axis is continuous and shows all potential bins, right-click the Sales (bin) pill on the Columns shelf and select Show Missing Values. This can be helpful for accurately representing gaps in your data distribution.

Advanced Control: Creating Bins with a Calculated Field

The default binner is fast, but it only creates evenly sized bins. What if you need irregular groups, like age brackets for a survey or custom performance tiers? For this, you need a calculated field.

Creating bins with a calculated field gives you total control over the grouping logic. Let’s create custom sales tiers: Small, Medium, and Large.

Step 1: Create a New Calculated Field

From the top menu, go to Analysis > Create Calculated Field, or right-click anywhere in the Data pane and select Create Calculated Field. Give your calculation a descriptive name, like "Sales Tiers".

Step 2: Write the Grouping Logic

You can use an IF statement or a CASE statement to define your logic. For our sales tiers, a nested IF statement works perfectly. In the calculation editor, type the following formula:

IF SUM([Sales]) < 50 THEN "Small (Under $50)"
ELSEIF SUM([Sales]) >= 50 AND SUM([Sales]) < 500 THEN "Medium ($50 - $499)"
ELSE "Large ($500+)"
END

Note: We use SUM([Sales]) because we want to apply the logic at the visualization's level of detail. If you wanted to categorize each individual row of data before aggregation, you would just use [Sales]. The choice depends on your specific analysis.

Click OK to save the calculated field. You’ll see your new Sales Tiers dimension appear in the Data pane.

Step 3: Use Your Custom Bins in a Visualization

You can now drag this new Sales Tiers dimension to the Columns or Rows shelf, or onto the Color card in the Marks pane to segment any chart. For example, showing a breakdown of profit by your custom sales tiers provides insight that equally-sized bins could not.

Tips for Using Bins Effectively

Choosing the Right Bin Size is an Art

The size of your bins dramatically affects the story your visualization tells.

  • Too large: You might oversimplify the data and miss important patterns. Your histogram will look like a few chunky blocks.
  • Too small: You might create too much noise, defeating the purpose of binning in a "spiky" or flat-looking chart.

There's no single perfect size. Start with Tableau's suggestion, then experiment by editing your bin and changing the size until the visualization clearly communicates the shape of your data's distribution.

Bins Aren't Just for Histograms

While histograms are the primary use case, remember that a bin is ultimately just a dimension. You can use it anywhere you'd use any other dimension.

  • Heat Maps: Use two different bin dimensions (e.g., Sales Bins vs. Profit Bins) to create a heat map showing the density of transactions.
  • Color Encoding: Drag a bin field to the Color card to segment another chart type, like a scatter plot, to see if clusters emerge.
  • Filtering: Use your bin field as a filter to let users focus on specific ranges, like "High Value Customers" based on a Sales bin.

Final Thoughts

Binning data in Tableau is a simple yet effective technique to transform dense, continuous data into clear, understandable categories. Whether you’re using the default feature to build a quick histogram or creating custom groupings with calculated fields, it helps you spot trends and distributions you might otherwise miss.

This kind of data exploration, including setting up bins and building specific views, can sometimes feel repetitive, taking you away from actual analysis. At Graphed, we streamline this entire process. Instead of manually creating bins and dragging pills, you simply ask in plain language, "Show me the distribution of sales in a histogram," and our AI analyst builds the chart instantly. By connecting all your data and letting you ask questions conversationally, we provide the answers and dashboards you need in seconds, letting you get straight to the insights.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.