How to Create a Bin Field in Tableau

Cody Schneider

Trying to show the distribution of a continuous measure, like sales or session duration, can quickly turn into a confusing visual with far too many data points. By grouping your data into "bins," you can easily transform this noise into a clear histogram that reveals patterns. This article will walk you through exactly how to create and use bins in Tableau to better understand your data.

What Exactly is a Bin in Tableau?

In data visualization, a "bin" is essentially a bucket you can group a range of numbers into. Think about analyzing the ages of all your customers. Looking at a chart with every single individual age - 21, 22, 23, 23.5, 24, etc. - is overwhelming and doesn't tell you much. Instead, you could create age bins to group them: 21-30, 31-40, 41-50, and so on. Suddenly, you have a much clearer picture of your customer age distribution.

Tableau treats continuous measures (the green pills) as a spectrum of values. Creating bins transforms that continuous measure into a discrete dimension (a blue pill), allowing you to count how many records fall into each bucket. This is the fundamental concept behind building a histogram, a chart that shows frequency distribution across different intervals.

Without bins, you're stuck looking at individual data points. With bins, you start seeing the story your data is trying to tell you - where values cluster, where the gaps are, and what the overall shape of your dataset looks like.

How to Create Bins from a Measure

Tableau makes creating standard, equal-sized bins incredibly simple. Let's use the Sales measure from the classic Sample - Superstore dataset as an example. Our goal is to see how our sales amounts are distributed.

Follow these step-by-step instructions to create your first bin field.

Step 1: Locate the Measure You Want to Bin

First, find the continuous measure you want to work with in the Data pane on the left side of your Tableau worksheet. For us, this is the Sales field. Continuous measures are typically distinguished by a green hash mark icon (#).

Step 2: Right-Click and Select "Create" > "Bins"

Right-click on your chosen measure (Sales). A context menu will appear. From this menu, hover over the Create option, and then click on Bins... in the next submenu.

This action will open the "Create Bins" configuration window, where you'll define how your "buckets" work.

Step 3: Configure Your Bin Size

The "Create Bins" dialog box is where you set the rules for your new dimension. There are a few key fields here:

  • New field name: Tableau automatically suggests a name, usually your original field name plus "(bin)". To keep your Data pane organized, it’s a good practice to rename this to something more descriptive, like "Sales (by $250)" or "Sales Bins." We'll just use "Sales (bin)" for this example.

  • Size of bins: This is the most important setting. It determines the range of each bucket. Tableau offers a "Suggest Bin Size" button, which uses an internal algorithm to pick a size it thinks is appropriate for your data's distribution. This can be a great starting point if you're not sure what size to use.

For more control, you can enter a specific numerical value. Let's set ours to 250. This means Tableau will create bins for ranges $0-250, $250-500, $500-750, and so on, until all sales values are covered.

After you've set the size, click OK.

Step 4: Check Your Data Pane for the New Bin Field

Once you click OK, Tableau adds a new field to your Data pane. You'll see "Sales (bin)" now appears under Dimensions with a histogram icon, indicating it's a bin field. Notice that it's a blue pill, meaning it’s now a discrete dimension you can use to categorize your data.

And that's it! You've successfully created a bin field. But creating it is just the first half of the process - now you need to use it in a visualization.

Visualizing Data with Bins: How to Build a Histogram

The most common and immediate use case for a bin field is building a histogram. This type of chart perfectly visualizes the frequency distribution of your data, showing you how many of your records fall into each bucket you just created.

Here’s how to build a simple histogram using your new Sales (bin) field.

Step 1: Drag the Bin to "Columns" and the Measure "Count" to Rows

First, click and drag your new Sales (bin) dimension from the Data pane and drop it onto the Columns shelf. You'll see that each bin appears as a header along the x-axis ($0, $250, $500, etc.).

Next, you need a measure to define the height of the bars - in other words, how many sales transactions fall into each bin. For this, you can right-click and drag the Sales measure onto the Rows shelf. When you drop it, a context menu will appear. Select the aggregation CNT(Sales) (Count of Sales).

Alternatively, you can just drag the "Order ID" (or any unique transaction identifier if you have one) to the Rows shelf and set its aggregation to "Count (Distinct)" to count the number of orders per bin.

Instantly, Tableau generates a histogram. You can immediately see that the overwhelming majority of sales fall in the $0-250 bin, with the frequency dropping off sharply for higher-value sales. This simple chart gives you powerful insight into the nature of your sales data a regular line chart never could.

Helpful Tips and Advanced Techniques

The standard bin creation process is fantastic for quick analysis, but sometimes you need more flexibility. Here are a few tricks to take your binning skills to the next level.

1. Creating Custom Bins With a Calculated Field

What if you need bins of uneven sizes? For example, you might want to see sales in buckets for "<$100," "$101 - $1000," and "$1001+." Tableau’s default bins must be of equal size, but you can get around this limitation by using a calculated field.

Here's how:

  1. Go to Analysis > Create Calculated Field.

  2. Give your calculation a name, like "Custom Sales Bins."

  3. Use an IF/ELSEIF/ELSE statement to define your logic.

When you click OK, you'll have a new dimension that categorizes every sale into one of these three custom buckets. You can then use this calculation in a bar chart to show the same kind of frequency distribution but tailored to your specific business thresholds.

2. Editing an Existing Bin Field

You’re not locked into the first bin size you choose. If you create a histogram and find it's either too granular (too many bars) or too broad (too few bars), you can easily adjust it.

Simply go to the Data pane, right-click on your Sales (bin) field, and select Edit.... This will reopen the "Create Bins" window, where you can enter a new bin size. Click OK, and your visualization will update automatically to reflect the new bin settings.

3. Understanding Bins vs. Groups

Beginners often confuse bins and groups, as both involve "bucketing" data. The key difference is simple:

  • Bins are for measures (quantitative numbers). They are created algorithmically based on a defined, uniform interval.

  • Groups are for dimensions (qualitative categories). You manually select members of a dimension and combine them into a category (e.g., grouping 'California', 'Oregon', and 'Washington' into a West Coast group). The original members are not related numerically.

Remember: Use bins for numbers like sales and age, use groups for categories like state and product category.

Final Thoughts

Learning how to create bins in Tableau is a simple but essential skill for turning pages of numbers into clean visualizations that highlight key data distributions. It's the go-to method for building histograms and getting a high-level view of how your data is spread out across a range of intervals.

While skills like this in Tableau or Power BI are incredibly useful, pulling insights shouldn't always require manual report building or specialized knowledge. At Graphed, we believe you should be able to get answers from your data just by asking questions. Instead of clicking and dragging to create bin charts, you connect your data sources once, then ask something like "show me the distribution of my new users by country" in plain English and instantly get a live, interactive dashboard that keeps itself updated. This automates the busywork of reporting so teams can focus their time on strategizing and analyzing data.