Create Bins in Tableau : Bijay Kumar
by: Bijay Kumar
blow post content copied from SalesForce FAQs
click here to view original post
### Summary of Creating Bins in Tableau In a recent analysis of sales data using Tableau, the author aimed to categorize customers based on their purchase amounts, such as small, medium, and high-value buyers. Initially, they tried to do this manually but later found a simpler method using Tableau's Bins feature. **What are Bins in Tableau?** Bins are equal-sized ranges that help group continuous data into discrete categories for easier analysis and visualization. For example, sales data can be grouped into ranges like $0-$999, $1,000-$1,999, etc. **How to Create Bins in Tableau:** 1. **Sales Bins Example:** - Connect Tableau to your dataset. - In the Data pane, select the Sales field, then choose Create > Bins. - Name the bin field and set the bin size (e.g., 1000). - Add the Sales bin to Columns and Customer Name to Rows to visualize the number of customers in each sales range. 2. **Profit Bins Example:** - Similar steps as above, but this time for the Profit field. - Create bins to categorize profits and losses. - Use a histogram chart to display the count of customers in each profit range. **Dynamically Changing Bin Size:** You can also create a parameter to change the bin size dynamically: - Create a parameter named "Profit Bin Size" with an integer data type. - Set minimum and maximum values and a step size. - Link this parameter to the Profit bin to allow real-time updates on the chart as the bin size changes. ### Conclusion This tutorial demonstrates how to create and manage bins in Tableau for analyzing sales and profit data effectively. Bins simplify complex datasets into understandable distributions, making it easier to visualize trends. ### Additional Context Using bins in data analysis is crucial for identifying patterns and making informed business decisions. Tableau's user-friendly interface allows users to manipulate data visually, enhancing the analytical process. ### Hashtags for SEO #Tableau #DataAnalysis #DataVisualization #SalesData #ProfitAnalysis #BusinessIntelligence #DataBins #TableauTutorial #Histogram #DataScience #Analytics #CustomerSegmentation
Recently, while analysing Sales data in Tableau, I wanted to see how many customers are in different purchase ranges, such as small buyers, medium buyers, and high-value customers. Initially, I attempted to filter and group them manually, using the calculated fields.
Then, I discovered a straightforward solution to categorise the measures into equal-sized ranges using the Tableau Bins feature.
In this Tableau tutorial, I will explain how to create bins in Tableau using examples. Additionally, I will explain how to dynamically update the field bin size.
What are Bins in Tableau?
In Tableau, bins are pre-defined, equal-sized ranges or “buckets” used to group a continuous measure into discrete categories for analysis and visualisation.
By creating bins, users can organise large datasets and trends, and create histograms to simplify complex data into distributions, such as grouping sales data into intervals like $0-$999, $1,000-$1,999, and so on.
Create Bins in Tableau
In the examples below, we will create bins in Tableau measure fields for different use case scenarios.
Example-1: Create Sales Bins in Tableau
In this example, we will create bins in the Sales measure to categorise customer purchase ranges.
Now, connect the Tableau with the dataset and follow the steps below to create bins.
- To create bins in Sales measure, go to the Data pane and select Sales -> Create -> Bins.

- In this step, enter the label for the bin field. After this, enter the size of the bins. For example, if we take the bin size as 1000, then the size will be divided as 0-1000, 1000-2000 and so on.
After defining the size of bins, click OK.

- To create the view, add the Sales bin to the Columns and records to the Rows.
- In this example, we will show the number of customers under a specific sales bin size. For this, click on the Customer Name in the Rows and select Measure ->Count.

- Now, change the Marks type to Bar. After this, press “Ctrl” and drag Customer Name (Count) to the Label card in the Marks section.

With this, we can see a histogram chart showing each bin with a 1K range. In all bins, we can see the number of customers who have sales in the specific range.
Example-2: Create Profit Bins in Tableau
In this example, we will create bins for the Profit measure field. Using this bin, we can categorise Loss and Profit segments.
Now, follow the steps below to create a bin for the Profit field in Tableau.
- In the Data pane, click on the Profit field and select Create -> Bins.

- Enter the label for the bin field, and define the range for the bins. In this example, I have defined the range of profit bins as 1000, which will distribute the bins as 0-1000, 1000-2000 and so on.
After defining the bin range, click OK.

- To create the chart view, drag the Profit bin to the Columns and Customer Name to the Rows.
- To display the count of customers in each bin, change the customer name from discrete to continuous. For this, click on the Customer Name in Rows and select Measure -> Count.
- Now, to show the loss and profit values on either side, click on the Show Me tab and select Histogram chart.

With this, we can see the number of customers in each bin where the range of profit is 500.
This way, we can create Profit beans in Tableau by following the above steps.
Dynamically Change Bin Size in Tableau
In Tableau, we can also change the bin size dynamically using a parameter. This parameter will have an input field, in which we can enter the bin size that will change dynamically on the chart.
In this example, I will use the Proft bin that we have created in the example above.
- To create a parameter, click on the dropdown in the Data pane and select Create Parameter.
- Define the details below to create the parameter that will control the bin size dynamically.
- Enter the Name as Profit Bin Size.
- Select the Data type as Integer.
- The current value will be the size of the bin that will change dynamically.
- Select the Minimum and Maximum values of the Range.
- At last, select the Step size for the bins and click OK.

- Open the bin field Profit(bin) in the edit window, and in Value select the parameter Profit bin Size that we have created and click OK.

- In the Data pane, click on the parameter Profit Bin Size and select Show parameter. With this, the parameter will be visible on the sheet through which we can update the bin size.

Now, we can see the parameter on the worksheet and in the input value, we can update the new bin size. As we change the bin size, it will also reflect in the chart.

This way, we can dynamically update the bin size values in Tableau.
Conclusion
In this Tableau tutorial, we have learned how to create bins in Tableau for different use cases like categorising Sales ranges and separating Profit and Loss values. We also learned how to dynamically update the bin size using parameters to change its size.
By using bins, we can group continuous data into ranges, build histograms, and define distributions to analyse the data in Tableau.
You may also like to read:
- Use Context Filters in Tableau
- Create a Set in Tableau
- Create a Table in Tableau
- Repeat Row Labels in Tableau
The post Create Bins in Tableau appeared first on SalesForce FAQs.
October 01, 2025 at 10:25PM
Click here for more details...
=============================
The original post is available in SalesForce FAQs by Bijay Kumar
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Post a Comment