03/05/2025
In this short blog post, we’ll walk through how to create a histogram in Power BI to better understand the distribution of your numerical data. Before we dive into the steps, we’ll also briefly discuss what histograms are and why they’re useful in data analysis.
Histograms help you visualize the frequency of values within defined ranges, making it easier to identify patterns, spot outliers, and understand how your data is spread. While Power BI doesn’t offer a built-in histogram chart, we’ll show you how to create one using binning and a simple column chart.
Let’s dive in!
What is a histogram?
A histogram is a type of bar chart that represents the distribution of numerical data. It shows how often values fall into specific ranges or intervals, called bins.
Key Features of Histograms:
X-axis: Represents the data range split into intervals (bins).
Y-axis: Represents the frequency (count) of data points in each bin.
Bars: The height of each bar shows how many data points fall within the bin’s range.
Example:
If you're analyzing test scores from 0 to 100:
You might have bins like 0–10, 10–20, ..., 90–100.
A tall bar in the 70–80 bin means many students scored in that range.
Histograms vs Bar Charts:
Histograms: Used for continuous data; bars are touching.
Bar Charts: Used for categorical data; bars are separate.
Let's create a histogram in PBI
First, you need to import your dataset into Power BI Desktop. For this example, I’m using the same dataset I used in a previous post, but you can use any dataset that contains a numeric column you'd like to analyze.
Now the fun part begins — we’re going to create bins, which are groups of values used to build the histogram.
To do this, right-click on the numeric column you want to group (for example, Sales Amount) in the Fields pane, and select "New group". This will open the Groups window.
In the Groups window:
Set the Group Type to Bin.
Specify the bin size — this defines the width of each group (e.g., 10, 1000, etc.), depending on the range and scale of your data.
Click OK, and Power BI will generate a new field with grouped intervals that we can now use to build our histogram. For more help refer the below images.
Now go to the report canvas in Power BI and select the Clustered Column Chart from the Visualizations pane. Then, drag and drop the new binned column (the one you just created) onto the X-axis. For the Y-axis, drag in a field like OrderID or any other column that you can count — Power BI will automatically aggregate it as a count, which is perfect for a histogram.
Tadaa! Just like that, you’ve created your histogram!
If you followed my previous post, you already know how to apply basic formatting and even conditional formatting to enhance your visuals.
Feel free to play around with the formatting options to make your histogram more insightful and visually appealing!
Histograms are a powerful way to explore and communicate the distribution of your data. While Power BI doesn’t offer a built-in histogram chart, with just a few simple steps—creating bins, using a column chart, and applying some formatting—you can build one easily and effectively.
I hope this post helped you understand how to create histograms in Power BI and why they’re useful in data analysis. Try experimenting with different bin sizes and formatting options to get the most out of your visuals.
Happy visualizing!