Short answer: Power BI has no histogram visual, so a histogram is a column chart of bins. For a column, right-click it in the Data pane, New group, Group type: Bin, set the bin size (or the number of bins), then put the new bin field on the X-axis and a count on the Y-axis. For a measure (order value per customer, days to deliver per order), build the bins with a small DAX table and a count measure.
The chart, part by part: What is a histogram? draws its parts and shows how to read one, its kinds and the mistakes to avoid.
An average delivery time of 3.1 days sounds fine. A histogram shows that most orders arrive in two days and one in ten takes over a week: the average hid a long tail that customers feel.
What does a histogram show?
The shape is the answer: a peak at two to three days, then a tail, and a bump at seven days and more that needs looking into (one carrier, one region, one warehouse).
How do you bin a column?
For a numeric or date column in the model, for example Orders[Delivery Days]:
- In the Data pane, right-click the column and pick New group.
- Group type: Bin. Choose Size of bins (for example 1) or Number of bins.
- Power BI adds a column
Delivery Days (bins). Drag it to the X-axis of a column chart and a count, for exampleOrders[Order ID]as Count, to the Y-axis. - Set the X-axis Type to Categorical so every bin gets a column, including empty ones in the middle, and remove the gaps between columns (Columns, Spacing) if you want the classic histogram look.
Bins on a column are fixed at refresh. That suits facts that do not change with the report's filters, such as each order's delivery days.
How do you bin a measure?
When the number to bin is a measure (each customer's revenue in the selected period), the bins must react to slicers, so they are a table:
Revenue Bins =
GENERATESERIES ( 0, 2000, 250 )This makes a one-column table Value with 0, 250, 500 ... 2000. Rename the column Bin Start, then count the customers whose revenue falls in each bin:
Customers in Bin =
VAR BinStart = SELECTEDVALUE ( 'Revenue Bins'[Bin Start] )
VAR BinEnd = BinStart + 250
RETURN
COUNTROWS (
FILTER (
VALUES ( Customer[Customer ID] ),
VAR R = [Revenue]
RETURN NOT ISBLANK ( R ) && R >= BinStart && ( R < BinEnd || BinStart = 2000 )
)
)Revenue Bins has no relationship to the model: it is a disconnected table that only gives the X-axis its values. The last bin (2000) takes everything above it, and NOT ISBLANK keeps customers who bought nothing in the period out of the first bin (a blank compares like 0).
| Bin Start | Customers in Bin |
|---|---|
| 0 | 812 |
| 250 | 534 |
| 500 | 301 |
| 750 | 166 |
| 1000 | 94 |
With a "Customer: Region" slicer on the page, the bins recount for that region.
How big should the bins be?
Too few bins and the shape disappears; too many and it is noise. Start with round sizes people understand (1 day, 50 euros, 5 minutes) and about 10 to 20 bins. Try two sizes: if the shape changes a lot, the data is thin and the histogram should say so.
| Shape | Means | Example |
|---|---|---|
| One peak, symmetric | values spread evenly around a typical value | weights of a packed product |
| One peak, long right tail | most are small, a few are big | order values, delivery times |
| Two peaks | two groups mixed in one | two warehouses, two customer types |
| A spike at the edge | a cap or a default value | "7+" bucket, a timeout |
What goes wrong?
- Bins as a continuous axis. On a continuous axis, empty bins vanish and the columns spread unevenly. Use categorical.
- Averages instead of a count. A histogram counts items per bin; summing or averaging a measure on the Y-axis makes a different chart.
- A fixed bin column for a measure. A calculated column is computed once and ignores slicers; use a bin table and a measure.
- The tail cut off. A last bin "2000+" collects the outliers; without it, they disappear from the picture.
Where can you check this?
- Microsoft Learn: Use grouping and binning in Power BI Desktop
- Microsoft Learn: GENERATESERIES function (DAX)
- Microsoft Learn: COUNTROWS function (DAX)
Where do you start?
Bin a column with New group for a first look, then build a bin table when the number is a measure. The scatter chart shows two numbers against each other, and the Analytics pane adds percentile lines.