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 th