How to Create a Histogram in Power BI

Cody Schneider8 min read

Averages can be misleading. Knowing your average order value is helpful, but seeing the full distribution of all orders - how many are small, medium, or large - tells a much richer story. That's where a histogram comes in, and this tutorial will show you exactly how to build one in Power BI, step by step.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

What is a Histogram? (And Why Isn’t It Just a Bar Chart?)

Before we build, let's be clear on what we're making. While they look similar, a histogram and a bar chart are not the same thing. They answer very different questions about your data.

  • A bar chart compares distinct categories. For example, you’d use a bar chart to compare sales figures for different countries (USA, Canada, Mexico) or T-shirt sizes (Small, Medium, Large). Each bar represents a separate, discrete group.
  • A histogram shows the distribution of continuous numerical data. Instead of categories, it groups numbers into ranges, or "bins," to show how frequently values fall into each range. You’d use a histogram to see the distribution of customer ages, Shopify order values, or website session durations.

In short, a bar chart shows you "how many" for separate things. A histogram shows you "how often" values appear within defined numerical ranges. Forgetting this distinction is a common mistake, but an important one for good analysis. Histograms help you spot patterns like whether most of your data clusters around an average, is skewed towards one side, or is spread out evenly.

Getting Your Data Ready

The good news is that histograms don't require complex data preparation. You just need one thing: a column of numerical data that you want to analyze.

For this tutorial, we will use a simple sales dataset. Imagine an Excel sheet or a database table with columns like OrderID, CustomerName, Product, and importantly, SaleAmount. The SaleAmount column will be our focus. It's the continuous numerical data we want to find the distribution for.

Whether you're looking at dollars, seconds, scores, or any other number, make sure that the column you want to use is formatted as a number type within Power BI (like Decimal Number or Whole Number). Power BI is usually smart about detecting this when you load your data, but it's always good to double-check in the Data view.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

How to Create a Histogram in Power BI with Grouping

The most reliable and flexible way to create a histogram in Power BI is by using a feature called "grouping" or "binning" on top of a standard column chart visual. This method gives you full control over how your data is distributed.

Let's walk through it.

Step 1: Get Your Data into Power BI

First, open Power BI Desktop and load your data source. You can use the "Get data" option on the home ribbon to connect to your Excel file, SQL database, or whatever source you have.

Once loaded, you should see your dataset and all its columns in the Fields pane on the right-hand side of the report view.

Step 2: Create Bins from Your Numerical Data

This is where the magic happens. We need to tell Power BI to take our continuous SaleAmount data and chop it up into descriptive ranges (bins).

  1. In the Fields pane, find the numerical field you want to analyze (in our case, SaleAmount).
  2. Right-click on the field name.
  3. In the context menu that appears, select New group.

A new window called "Groups" will pop up. This is where you'll configure your bins.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Step 3: Configure Your Histogram Bins

On the Groups screen, you have a few important settings:

  • First, change the Group type at the top from "List" to "Bin". This tells Power BI you want to create ranges, not group individual values.
  • Now, look at the "Bin" options:
  • For our example, let's select Size of bins and set the Bin size to 25. This means Power BI will create a bar for every $25 increment. The Min and Max values will usually default correctly based on your data.

Click OK. You'll notice a new field in your Fields pane called SaleAmount (bins). Power BI automatically appends "(bins)" to the original field name.

Step 4: Build the Column Chart

Now that we have our binned data field, we can build the actual visual.

  1. In the Visualizations pane, click on the icon for the Stacked column chart or Clustered column chart. A blank chart placeholder will appear on your report canvas.
  2. With the blank chart selected, drag your newly created binned field, SaleAmount (bins), from the Fields pane to the X-axis field well in the Visualizations pane.
  3. Next, drag your original numerical field, SaleAmount, to the Y-axis field well.

You're almost there! But the chart probably doesn't look right yet. It's likely showing the sum of sales for each bin, when what we want is the count of orders.

Step 5: Change the Y-Axis Aggregation to "Count"

A histogram counts the frequency of occurrences within each bin. We need to tell Power BI to count the rows, not sum the values.

  1. In the Visualizations pane, find the SaleAmount field you just added to the Y-axis.
  2. Click the small downward arrow next to its name.
  3. In the menu that appears, change the aggregation from the default "Sum" to "Count".

Instantly, your chart should transform into a proper histogram! Each bar now represents a $25 sales range, and the height of the bar shows how many sales fall into that range. You can now clearly see your sales distribution.

Customizing Your Histogram for Better Insights

Building the histogram is just the first step. To make it truly useful, you'll want to refine it.

Adjusting the Look and Feel

With your histogram visual selected, click on the paintbrush icon ("Format your visual") in the Visualizations pane. Here you can make several key improvements:

  • Reduce Column Gaps: A defining visual feature of a histogram is that its bars often touch, to show that the data is continuous. To do this, go to the Columns section, and under Layout, reduce the Space between columns slider to 0% or a very small number.
  • Give it a Clear Title: The default title might be something like "Count of SaleAmount by SaleAmount (bins)." Change this to something a human can actually read, like "Distribution of Sales by Order Value." You'll find this setting under the General tab > Title.
  • Add Data Labels: If you want to see the exact count on top of each bar, turn on Data labels. This can make the chart easier to read at a glance without having to hover over each bar.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Experimenting with Bin Size

The bin size you choose has a huge impact on what story your histogram tells.

  • If your bins are too wide (e.g., a bin size of $500), you might lump too many data points together and miss important details in the distribution.
  • If your bins are too narrow (e.g., a bin size of $1), you might have too many bars with small counts, creating a lot of noise and making it hard to see the overall shape.

Fortunately, it's easy to adjust. Just go back to the Fields pane, right-click your SaleAmount (bins) field, select Edit group, and change the bin size in the pop-up window. Your visual will update instantly. Play around with a few different sizes to see which one best reveals the underlying pattern in your data without being a distraction.

Examples of Histograms in Business

You can apply this technique to far more than just sales data. Here are a few relatable examples:

  • Marketing Analytics: Connect to Google Analytics data and create a histogram of "Session Duration" to see if most users leave your website in the first 30 seconds or if there's a significant portion that stays for several minutes.
  • E-commerce Performance: Analyze Shopify data to see the distribution of "Items per Order." This can directly inform your "free shipping over X items" strategy.
  • Sales Team Management: Use data from Salesforce to build a histogram of "Days to Close Deal." If you see a large number of deals clustering at 90+ days, it might signal a bottleneck in your sales process.

Final Thoughts

Creating a histogram in Power BI boils down to one simple concept: binning your numerical data and then counting the items in each bin using a column chart. This approach provides a powerful glimpse into the underlying distribution of your data, helping you see the full picture an average could never show you.

Manually building these visualizations, even in tools as capable as Power BI, still requires several clicks, configurations, and a bit of a learning curve. We created Graphed to streamline this entire process. Instead of creating bins and modifying axes, you can simply ask, "Show me a histogram of our Shopify order values for last month," and get back an interactive, presentation-ready chart in seconds. We automate the busy work so you can go from data to decision faster than ever before.

Related Articles