Create your own
Lesson illustration

Comparing Healthcare Measures Across Categories with Bar Charts

Hello again. In the previous lesson, you imported a de-identified healthcare workbook and verified that its table and fields appear in Power BI Desktop. You now have the minimum ingredients for a useful report: a categorical field such as Department or Admission Type, and a numeric field such as Wait Time, Length of Stay, or Patient Count.

In this lesson, you will create a clustered bar chart that compares one healthcare measure across categories. By the end, you should be able to choose the appropriate fields, control how Power BI summarizes the number, sort the result for easy comparison, and check that the chart answers the question you intended.


What question is a bar chart designed to answer?

A bar chart answers a comparison question:

How does one measure differ across a set of categories?

For example:

  • What is the average wait time by department?
  • Which admission type has the highest average length of stay?
  • How many encounters occurred in each service line?
  • What is the total patient count by facility?

A standard bar chart uses horizontal bars:

  • The Y-axis (vertical axis) holds the categories.
  • The X-axis (horizontal axis) holds the numeric measure.

This horizontal layout is especially useful when category names are long, such as “Emergency Department,” “Outpatient Imaging,” or “Cardiology Clinic.”

A column chart contains the same basic information but rotates the design: categories run along the bottom and values rise vertically. For this lesson, use a clustered bar chart, which is the clearest starting point for comparing one value across categories.

Before working in Power BI, phrase your chart in one sentence. A good beginner choice is:

Compare average wait time across departments.

This wording tells you exactly which fields belong in the chart:

Chart roleExample fieldPurpose
CategoryDepartmentCreates one bar for each department
MeasureWait TimeDetermines the length of each bar
AggregationAverageCalculates typical wait time per department

Do not add a legend yet. A legend splits each bar into subgroups and makes a simple comparison harder to read. You will use legends and more complex chart types later, when the analytical question calls for them.


See the basic chart pattern

Microsoft’s short guide reinforces the essential pattern: select a visual, then place a category field on an axis and a numeric field in the values area.

Get started with Power BI Desktop

Read the “Create your first visualizations” section in Microsoft Learn. It gives the core relationship between the Data pane, the Visualizations pane, and the fields that define a chart.

In the section titled “Create your first visualizations,” read the complete four-step list. Pay particular attention to the explanation that a visual is built from selected fields, then changed and customized through the Visualizations pane.

If you prefer to see the drag-and-drop action before doing it yourself, watch this brief example. It uses shipping data, but its logic is identical: a category goes on one axis and a numeric quantity on the other.

Your first 10 minutes of Power BI - A no-nonsense getting started tutorial for beginners

In “Your first 10 minutes of Power BI,” Chandoo demonstrates a column chart from an empty canvas. Watch for the relationship between the selected chart type and its axis field wells.

Watch the chart build. Notice how the category field, Country, is dragged to the X-axis and the numeric field, Boxes Shipped, is dragged to the Y-axis. For your horizontal bar chart, the orientation will be reversed: categories on Y-axis and values on X-axis.


Build your first healthcare comparison chart

Return to Report view in your healthcare .pbix file. It is the view with the report canvas, where you can place and arrange visuals.

1. Select the clustered bar chart

In the Visualizations pane, select the Clustered bar chart icon. Hover over icons if you are unsure; Power BI displays a tooltip with the chart name.

A blank visual placeholder appears on the report canvas. Click it once if necessary so that its border is visible. The Visualizations pane should now show the field wells for the selected visual.

Depending on your Power BI Desktop version, the pane may be labelled Build visual and your dataset list may be called Data rather than Fields. The workflow is the same.

A Power BI Desktop report page with a selected chart and its field wells visible in the Visualizations pane. The highlighted field wells show where category, measure, legend, and optional detail fields are assigned; for this lesson, use only the category axis and numeric measure axis.

2. Add the category field to the Y-axis

In the Data pane, expand your imported healthcare table. Find a categorical field, ideally one with a manageable number of meaningful values.

For the example question, drag Department to the chart’s Y-axis field well.

Other possible category fields include:

  • Admission Type
  • Discharge Status
  • Service Line
  • Facility
  • Care Setting

After dropping the field, Power BI creates one row position for each category. The bars will not have meaningful lengths until you add a numeric field.

A category is most useful when the labels are clear and the number of categories is limited. A chart with six departments is usually easy to scan; a chart with several hundred diagnosis codes is usually not a good first bar chart.

3. Add the numeric field to the X-axis

Now drag a numeric field to the X-axis field well. For the main example, use Wait Time.

As soon as you drop it, Power BI calculates a value for each department and draws the bars. Initially, Power BI commonly summarizes a number as Sum. That default is not always the meaning you want.

For a question such as “Which department has the greatest overall accumulated wait time?”, a sum may be meaningful. But if you want to compare the typical patient experience, average wait time is normally more meaningful than total wait time.

4. Choose the correct summarization

In the X-axis field well, locate your numeric field. Select the small dropdown arrow beside it and choose the aggregation that matches the question.

For the example, choose:

Wait Time Average

Your chart now means:

Average wait time for records in each department.

This single setting changes the business meaning of the chart. Consider the contrast:

Setting for Wait TimeWhat the bar representsUseful question
SumTotal of all recorded wait minutesWhere is the accumulated waiting burden largest?
AverageTypical wait minutes per recordWhich department has the longest typical wait?
MinimumShortest recorded waitWhat is the best observed case?
MaximumLongest recorded waitWhere did the most extreme delay occur?

For Length of Stay, Average is likewise often a sensible operational comparison. For a field such as Patient Count, Sum is usually appropriate if each row contains a count to be added.

Be careful if your file contains multiple rows per department per day, rather than one row per encounter. An average of a daily total answers a different question from an average per encounter. At this stage, inspect a few rows in Data view if unsure about what a record represents. Later, you will formally define data grain before building a semantic model.


Sort and read the result

A bar chart becomes much easier to interpret when its categories are ordered by the value being compared.

Select the chart. In its upper-right corner, select the More options icon, shown as an ellipsis . Choose Sort by, select your measure—for example, Average of Wait Time—and choose Descending.

The department with the highest average wait time should now appear at the top.

Read the visual as a precise statement, not merely as a picture:

  • Each bar represents one department.
  • The bar’s endpoint on the X-axis is that department’s calculated average wait time.
  • The longest bar identifies the largest value within the current report context.
  • A bar chart compares categories; it does not by itself explain why one category is higher.

Hover over a bar to open its tooltip. Confirm that the department name and displayed value match the bar you are looking at. Tooltips are a quick way to inspect exact values without turning on extra labels.

Avoid drawing conclusions from tiny differences. If one department has an average wait of 31.2 minutes and another has 31.5 minutes, the visual shows a difference, but you would need more context before treating it as operationally important.


Validate the chart before trusting it

A chart can look polished while answering the wrong question. Use this short check before saving:

  1. One bar per category: Confirm that each visible bar is a department, admission type, or other intended category—not individual patient IDs or dates.
  2. Correct measure: Hover over two or three bars and check that the measure is the one you intended, such as Average of Wait Time, not Sum of Wait Time.
  3. Plausible scale: If average wait times are normally measured in minutes, values such as 25 or 40 may be plausible. Values in the hundreds of thousands usually indicate that Power BI is summing when you meant to average.
  4. No unexpected blank category: If a bar appears as “(Blank),” it represents records with a missing category value. Do not silently relabel it or delete data in Data view. You will address missing values systematically in Power Query.
  5. Appropriate number of categories: If there are too many bars to read, consider a broader category field for now. Filtering and more deliberate design come later.

Give the visual a clear title. Select the chart, open Format visual in the Visualizations pane, find Title, turn it on if needed, and use a title that states both measure and category:

Average Wait Time by Department

This is enough basic formatting for now. The later report-formatting lesson will cover consistent colors, labels, number formats, alignment, and page layout.

Finally, save your file.


A practical note on bar-chart choices

Power BI offers several bar and column chart variations. Their names describe how values are arranged:

  • Clustered bar chart: Separate horizontal bars. Best starting point for comparing one measure across categories.
  • Stacked bar chart: Each bar is split into colored components. Useful when both the total and its composition matter.
  • 100% stacked bar chart: Every bar has the same total length and shows proportions only. Useful for comparing shares, not total volume.

For now, stay with a clustered bar chart and one measure. A simple visual that answers one question clearly is more valuable than a complex visual that asks the reader to decode several things at once.


Key takeaways

You can now create a category comparison in Power BI:

  1. Start with a precise question, such as average wait time by department.
  2. Insert a clustered bar chart.
  3. Put the category field on the Y-axis and the numeric field on the X-axis.
  4. Check and change the numeric field’s aggregation so the chart has the intended meaning.
  5. Sort by the measure in descending order, verify a few tooltip values, and use a descriptive title.

Next, you will create a line chart to show how a healthcare measure changes over time.

Can't find a good explanation? Sign up and we'll make it for you

Sign up