What is a Bin in Tableau?

Cody Schneider

When you're trying to analyze a continuous measure in your dataset - like sales figures, customer ages, or product discounts - the sheer number of unique values can be overwhelming. Tableau's 'bin' feature simplifies this by grouping those individual values into manageable buckets or ranges. This article will show you exactly what bins are, how to create them step-by-step, and how you can use them to find valuable patterns in your data.

What Exactly Is a Tableau Bin?

Think of bins as containers you create to hold a range of values. Instead of looking at hundreds or thousands of individual data points, you can group them together to see the bigger picture. The most common use for bins is creating a histogram, which is essentially a bar chart that shows the frequency distribution of your data.

For example, imagine you have an online store and want to analyze customer age data. Your raw data might look like this:

  • Customer 1: 23

  • Customer 2: 45

  • Customer 3: 19

  • Customer 4: 31

  • Customer 5: 28

  • ... and so on for thousands of customers.

Trying to chart each individual age won't tell you much. It would be a messy, unreadable visualization. By using bins, you can group these ages into ranges:

  • 18-25

  • 26-35

  • 36-45

  • 46-55

  • 56+

Now, you can easily create a bar chart showing how many customers fall into each age group. This immediately tells you about your customer demographics - perhaps your largest customer segment is in the "26-35" range. This grouping process is what Tableau calls binning. It transforms a continuous measure (like age) into a discrete dimension (like age group) that you can use for powerful analysis.

Creating Bins in Tableau: A Step-by-Step Guide

Creating bins in Tableau is straightforward. We’ll use the Sample - Superstore dataset that comes packaged with Tableau to walk through an example using the Sales measure.

Step 1: Locate Your Measure

In the Data pane on the left side of your Tableau workspace, find the continuous measure you want to bin. Continuous measures are typically green pills. In our case, this will be the [Sales] measure.

Step 2: Create the Bins

Right-click (or control-click on Mac) on the [Sales] measure. In the context menu that appears, navigate to Create > Bins...

Step 3: Configure Your Bin Settings

A new dialog box will pop up, giving you a few options to configure your bins.

  • New field name: Tableau automatically suggests a name, usually your original field name followed by "(bin)". You can change this to something more descriptive if you like, for example, "Sales Bins".

  • Size of bins: This is the most important setting. It determines the range for each bin. You can either enter a specific value or let Tableau suggest an optimal size based on your data's min/max values and overall distribution. For our sales data, let's start by entering 250, which means each bin will represent a $250 range (e.g., $0-$250, $251-$500, etc.). It helps to inspect your data first (min and max values) to determine an appropriate bin size.

Click OK once you've set the size.

Step 4: Use Your New Bin Dimension

Look back at your Data pane. You’ll see a new field under the Dimensions section named Sales (bin). Notice that it has a histogram icon and is a blue pill, indicating it's now a discrete dimension.

You can now use this new dimension to build a visualization!

Building a Histogram with Your Bins

Now that you've created your Sales (bin) dimension, let's build the histogram to see the distribution of order sales values.

  1. Drag your newly created Sales (bin) dimension to the Columns shelf.

  2. Drag a count of records or a distinct count of orders (e.g., drag Order ID to the Rows shelf and change its aggregation to COUNTD for Count Distinct) to the Rows shelf.

Tableau will instantly generate a histogram. You can now see how many orders fall within each $250 sales increment. In the Superstore dataset, you’ll likely find a massive number of orders in the $0-$250 bin, with a steep drop-off for higher-value orders. This single view tells a powerful story about your business: it's driven primarily by a high volume of small-ticket sales.

Practical Use Cases for Tableau Bins

While histograms are the most common application, bins are useful in many other scenarios for summarizing data and uncovering insights.

1. Analyzing Test Scores

Imagine you're an educator with a dataset of student test scores from 0-100. Binning these scores into ranges like 0-59 (Failing), 60-69 (D), 70-79 (C), 80-89 (B), and 90-100 (A) allows you to quickly visualize the overall class performance and identify if more students are struggling or excelling.

2. Grouping Customer Discounts

In e-commerce, you might offer a variety of percentage discounts. Instead of looking at individual percentages (1%, 2%, 5%, 10%, etc.), you can bin them into logical groups like "Low Discount (0-10%)", "Medium Discount (11-25%)", and "High Discount (26%+)". You can then analyze how sales volume or profit margin correlates with the level of discount offered.

3. Creating Density Heatmaps

For spatial analysis, you can bin geographic coordinates (latitude and longitude) to create a density map. This is incredibly useful for visualizing concentrations of events or customers. For example, a ride-sharing company could use binned locations to see hotspots for ride requests during certain times of the day, helping them preposition drivers more effectively.

Advanced Control: Creating Bins with a Calculated Field

Tableau's default binning feature is fantastic for creating uniform, evenly sized bins. However, sometimes you need more flexible, non-uniform ranges. For example, with sales data, you might want to create categories like:

  • Small Order (< $50)

  • Medium Order ($50 - $499)

  • Large Order ($500 - $999)

  • Enterprise Order (≥ $1000)

You can achieve this by creating a calculated field.

  1. In the Data pane, click the dropdown arrow at the top and select "Create Calculated Field."

  2. Give your calculation a name, like "Sales Tiers."

  3. Enter a formula using an IF/ELSEIF statement:

This calculated dimension gives you complete control over the boundaries and names of each group. It functions just like a bin, but with custom logic better suited to your specific business rules.

Bins vs. Groups: Understanding the Difference

A common point of confusion for new Tableau users is the difference between bins and groups. Both are used for categorization, but they serve different purposes.

  • Bins are used exclusively for continuous measures. The goal is to turn a numerical range into discrete, evenly-sized buckets. Bins are always created based on a mathematical definition (e.g., every 10 units, every $50).

  • Groups are used primarily for dimensions, but can be used for measures as well. The goal is to combine distinct members into a larger category manually. For example, you could group the states [California], [Oregon], and [Washington] into a new group called "West Coast." Grouping is an arbitrary, user-defined categorization that doesn't rely on a numerical range.

The key takeaway is this: use bins for formulaic segmentation of a continuous range. Use groups for manual, categorical bundling of distinct members.

Final Thoughts

At its core, binning in Tableau is a simple but powerful technique for turning noisy, continuous data into clear, understandable groups. By discretizing your measures, you can create summary visualizations like histograms, heatmaps, and structured bar charts that reveal distributions, find patterns, and deliver insights you would have otherwise missed.

While mastering features like bins in Tableau is an essential skill, sometimes you just need faster answers from your data without building everything manually. At Graphed, we remove the friction by connecting to all your business data sources and letting you ask questions in natural language. Instead of clicking through menus to create bins and build a histogram, you can simply ask, "Show me a histogram of our sales grouped into $250 increments," and get an instant visualization. It's about empowering your whole team to get to the "aha!" moment in seconds, not hours.