Analyzing Hospital Price Transparency Data in Excel: A Real-World Case Study

In this tutorial, we will show how to analyze hospital price transparency data in Excel using a real-world case study. Let’s compare published charges with negotiated insurance rates to identify pricing differences.

Analyzing Hospital Price Transparency Data in Excel: A Real-World Case Study

Hospital prices can vary significantly depending on the medical procedure, hospital, and insurance plan. A hospital may publish one price for a service, while its negotiated rates with insurance companies can be substantially different. In the United States, hospitals are required to publish machine-readable files containing their standard charges, including gross charges, discounted cash prices, and payer-specific negotiated rates. These publicly available datasets create opportunities to investigate healthcare pricing using Excel.

In this tutorial, we will show how to analyze hospital price transparency data in Excel using a real-world case study. Let’s compare published charges with negotiated insurance rates to identify pricing differences.

Step 1: Download Real Hospital Price Transparency Data

For this case study, we will use publicly available pricing data from UPMC Horizon, a hospital in Greenville, Pennsylvania.

The file was updated on March 6, 2026. An independent examination of the file by Project Crossfoot reports approximately 620,000 data rows, making it a useful real-world example of a large healthcare dataset.

To download the dataset:

  • Open the UPMC Horizon Standard Charges webpage
  • Scroll to the Machine Readable File of Items and Services section
  • Click Download the UPMC Horizon-Greenville Hospital Machine Readable File of Items & Services
  • Save the CSV file on your computer

Understand the Dataset

The file uses the CMS tall-CSV structure. Some important fields include:

Column Description
description Medical service or procedure
code|1 Procedure or billing code (or another numbered code field)
setting Inpatient or outpatient setting
standard_charge|gross Gross charge
standard_charge|discounted_cash Discounted cash price
payer_name Insurance company
plan_name Insurance plan
standard_charge|negotiated_dollar Negotiated dollar rate
standard_charge|min Minimum negotiated charge
standard_charge|max Maximum negotiated charge

This file contains hospital pricing information for different medical services and insurance arrangements. The specific numbering of code columns can vary. The CMS data dictionary explains the standardized structure and the meaning of each field.

For a manageable case study, we will focus on three procedure codes that appear in the hospital’s published data.

Procedure code Service
10005 Fine needle aspiration biopsy with ultrasound guidance
10021 Fine needle aspiration biopsy without imaging guidance
10060 Incision and drainage of a simple abscess

These procedures provide a useful starting point because their published list prices and negotiated rates can be compared.

Step 2: Import and Clean the Data Using Power Query

Hospital transparency files are not always ready for direct analysis. They may contain thousands of repeated procedure records, missing rates, multiple payer arrangements, and additional metadata.

Power Query allows us to prepare the data without manually editing the original CSV.

Import the CSV File

  • Open a blank Excel workbook
  • Go to the Data tab >> select Get Data >> select From File >> select From Text/CSV
  • Select the downloaded CSV file
  • Click Transform Data to open Power Query Editor

1. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

As the file is large, the preview may take some time to load.

Clean the Hospital Pricing Data

Remove the Metadata Rows:

The CMS CSV structure contains general hospital information in the first two rows and service-related column headers in the third row.

In Power Query:

  • Delete any automatically added Promoted Headers and Changed Type steps so that the original first row is visible again
  • Go to the Home tab >> select Remove Rows >> select Remove Top Rows
  • Enter 2 >> click OK

2. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Go to the Home tab >> select Use First Row as Headers

3. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

The data will now have service-related fields such as description, payer_name, and standard_charge|gross as its column headers.

Select the Necessary Columns:

  • Go to the Home tab >> select Choose Columns
  • Keep the procedure code and its code-type column, description, setting, and modifiers, along with gross charge, cash price, payer, plan, and negotiated dollar amount
  • Click OK

4. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

The procedure code identifies the service, while the payer and plan identify the insurance arrangement associated with a negotiated rate.

Correct the Data Types:

Set the following data types:

Fields Data type
Procedure code, description, payer, plan, setting, modifiers Text
Gross charge, cash price, negotiated dollar amount Decimal Number

If a monetary column imports as text:

  • Click Change Type >> select Using Locale
  • Select Decimal Number and an appropriate English (United States) locale
  • Keep procedure codes as text to preserve any leading zeros or alphanumeric codes

Step 3: Filter and Reshape the Pricing Data

A large dataset is not necessary to demonstrate the analysis. We can select the three procedure codes identified earlier.

Filter the Procedure Codes

First, identify which code column contains the CPT codes. It may be code|1 or another numbered code column.

If the relevant column is code|3:

  • Go to the Add Column tab >> select Custom Column
  • Name the new column Selected Procedure and enter:
= List.Contains(
    {"10005", "10021", "10060"},
    Text.From([#"code|3"])
)

5. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Filter the column to TRUE
  • Next, remove the helper column

Also check the corresponding code-type field and retain CPT-coded entries. This prevents an unrelated billing code with the same characters from entering the analysis.

  • Rename the selected code column to Procedure Code
  • Rename the monetary fields to Gross Charge, Cash Price, and Negotiated Rate
  • Rename the query HospitalBase

6. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Reshape the Dataset into a Comparison Table

Since the source file is already in tall format, we do not need to unpivot payer columns. Instead, we will create a service-level price table and join it to the payer-specific rate records.

Create the Service Price Table:

  • Right-click the HospitalBase query in the Queries pane >> choose Reference
  • Rename the new query ServicePrices
  • Go to the Home tab >> select Group By >> select Advanced
  • Group by Procedure Code, description, setting, and modifiers
  • Create a Gross Charge aggregation using Max of the original gross-charge field
  • Add a Cash Price aggregation using Max of the cash-price field
  • Click OK

7. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

This creates a service-level table with one row per selected procedure, description, setting, and modifier combination.

Check for inconsistent gross prices within a group before treating the maximum as the service price. If the source contains multiple genuinely different charges for the same group, the underlying service identifiers need further examination.

Create the Negotiated-Rate Table:

  • Right-click HospitalBase >> choose Reference again
  • Rename this query NegotiatedRates
  • Keep rows where Negotiated Rate, payer_name, and plan_name are populated
  • Go to the Home tab >> select Merge Queries to merge with ServicePrices
  • Match the same procedure code, description, setting, and modifier fields in both queries, selecting them in the same order
  • Use a Left Outer join >> click OK

8. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Expand the Gross Charge and Cash Price columns from ServicePrices
  • Click OK

9. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Remove the original gross, cash, and other unnecessary columns from NegotiatedRates if necessary, so the merged columns are the ones used in the final table.

Before continuing, confirm that the merged gross charges are populated and that procedure descriptions, settings, and modifiers match correctly. Do not replace missing negotiated rates with zeros.

Calculate the Pricing Difference

In NegotiatedRates:

  • Go to the Add Column tab >> select Custom Column
  • Name the column Price Difference and enter:
= if [Gross Charge] = null
	or [Negotiated Rate] = null
  then null
  else [Gross Charge] - [Negotiated Rate]
  • Create another column named Difference %:
= if [Gross Charge] = null
	or [Gross Charge] <= 0
	or [Negotiated Rate] = null
  then null
  else
	([Gross Charge] - [Negotiated Rate])
	/ [Gross Charge]
  • Set Difference % to the Percentage data type

11. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

This measures how far the negotiated rate is below the gross charge. It is not a patient’s personal discount or insurance savings.

Load the Dataset

Once the transformations are complete:

  • Go to the Home tab >> select Close & Load To

10. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Select Table >> click New Worksheet
  • Click OK
  • Rename the worksheet Cleaned Data and the Excel Table HospitalRates

13. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Step 4: Compare Gross Charges and Negotiated Rates with PivotTables

Now that our data is organized, we can use PivotTables to summarize pricing differences.

Create a Procedure Comparison PivotTable

  • Select any cell in the HospitalRates table
  • Go to the Insert tab >> select PivotTable
  • Choose New Worksheet as a location
  • Click OK

14. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Arrange the fields as follows:
PivotTable area Field
Rows Procedure Code, Description
Values Gross Charge (Max)
Values Negotiated Rate (Average)
Values Cash Price (Max)
Filters Payer Name, Plan Name, Setting

15. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Select one specific payer and plan before interpreting the negotiated-rate values
  • Set the monetary fields to Currency
    • Right-click >> select Value Field Settings >> select Number Format >> select Currency

This PivotTable compares the listed price and negotiated rate for each selected procedure. Among the three selected procedures, CPT Code 10021 has the largest percentage difference between its gross charge and average reported negotiated rate.

Compare Different Insurance Plans

  • Insert a second PivotTable using the cleaned data table
  • Arrange the fields:
PivotTable area Field
Rows Payer Name, Plan Name
Values Negotiated Rate (Average)
Filters Procedure Code, Setting
  • Select a single procedure code and setting

16. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

This makes it possible to compare how much different insurers have negotiated for the same hospital service.

For example, if one plan (Commercial) has a negotiated rate of $494 and another has a negotiated rate of $815.10 for an identical service, the difference is $321.10.

Step 5: Highlight Large Pricing Differences with Conditional Formatting

Conditional formatting helps reveal unusual or significant values without requiring you to inspect every cell.

Highlight Larger Differences

In the Cleaned Data worksheet:

  • Select the values in the Difference % column
  • Go to the Home tab >> select Conditional Formatting >> select Color Scales
  • Choose a three-color scale

17. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Higher percentages will stand out visually, helping identify procedures where negotiated rates are much lower than published gross charges.

Highlight Negotiated Rates Above Gross Charges

To flag cases where the negotiated rate exceeds the gross charge:

  • Select the Negotiated Rate values in the cleaned data table
  • Go to the Home tab >> select Conditional Formatting >> select New Rule
  • Select Use a formula to determine which cells to format
  • Assuming the first negotiated rate is in I2 and the first gross charge is in K2, enter:
=AND(ISNUMBER(I2),ISNUMBER(K2),I2>K2)
  • Click Format >> choose a light red fill >> click OK

18. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Such cases are worth investigating, but they do not automatically indicate incorrect data. Contract arrangements and reporting methodologies can be more complicated than a simple fixed-dollar price.

19. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Step 6: Create a Hospital Pricing Dashboard

We can now bring the analysis together in a one-page Excel dashboard.

  • Create a new worksheet named Dashboard

Insert a Comparison Chart

  • Select the procedure comparison PivotTable
  • Go to the PivotTable Analyze tab >> select PivotChart >> choose Clustered Column
  • Move the chart to the Dashboard worksheet
  • Give it the title Gross Charges vs. Negotiated Rates by Procedure

20. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

This chart allows readers to compare the hospital’s listed charges with the rates negotiated by a selected insurance plan.

Add a Payer Comparison Chart

  • Select the second PivotTable
  • Insert a Clustered Bar Chart
  • Show negotiated rates by payer and plan for a selected procedure

21. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

A horizontal bar chart works well because payer and plan names may be long.

Add Interactive Slicers

To make the dashboard easier to explore:

  • Select a PivotTable
  • Go to the PivotTable Analyze tab >> click Insert Slicer
  • Select Procedure Code, Payer Name, and Setting
  • Click OK

22. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

  • Right-click each slicer >> select Report Connections to link it to the relevant PivotTables

23. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Arrange the dashboard as follows:

Hospital Pricing Dashboard

  • Insert KPI cells using the following formulas:
KPI Formula
Gross Charge =GETPIVOTDATA(“Max of Gross Charge”,’Procedure Comparison’!$A$5)
Cash Price =GETPIVOTDATA(“Max of Cash Price”,’Procedure Comparison’!$A$5)
Average Negotiated Rate =GETPIVOTDATA(“Average of Negotiated Rate”,’Procedure Comparison’!$A$5)
Difference % =IFERROR((A4-E4)/A4,””)
  • Move Slicers and Charts to the Dashboard sheet
  • Insert a table showing all the procedure codes

26. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Test the Dashboard:

  • Select one code from the Slicer
  • All KPIs and charts update automatically

27. Analyzing Hospital Price Transparency Data in Excel A Real World Case Study

Now you can see the negotiated rates and price differences at a glance. Use the slicers to dig deeper into plans, settings, and more.

Step 7: Interpret the Hospital Pricing Results

To understand what these comparisons might reveal, we can examine a few independently summarized figures from UPMC Horizon’s March 2026 pricing file.

Project Crossfoot reports the following rounded amounts, including a negotiated-price summary across payer rates. These are useful external reference values, not the calculated output of a particular payer-plan PivotTable.

Procedure Code Gross Charge Cash Price Negotiated Summary
10005 $1,235 $741 $646
10021 $2,997 $1,798 $433
10060 $827 $496 $263

The figures indicate several interesting pricing patterns.

  • Gross charges can be substantially higher than negotiated rates: For procedure 10021, the reported negotiated summary is approximately 85.6% below the published gross charge.
  • Cash prices can differ from both gross charges and negotiated rates: In these three examples, the cash prices are approximately 40% lower than their corresponding gross charges.
  • Pricing differences vary by procedure: For procedure 10005, the negotiated summary is about 47.7% below the gross charge, compared with approximately 68.2% for procedure 10060.

These findings demonstrate why examining different types of hospital prices can be more informative than relying on a single published amount.

However, gross charges, negotiated dollar rates, and discounted cash prices are not necessarily what an individual patient will pay. Actual costs can depend on insurance coverage, deductibles, copayments, service bundles, and other contractual conditions. UPMC also cautions against treating individual line-item rates as complete reimbursement amounts.

Conclusion

By following this tutorial, you can analyze hospital price transparency data in Excel using real-world data. Hospital price transparency datasets offer an opportunity to explore real healthcare pricing using Excel. In this case study, we used Power Query to prepare complex pricing data, PivotTables to compare charges and negotiated rates, conditional formatting to identify significant differences, and charts and slicers to build an interactive dashboard.

You can apply the same approach to other hospitals’ machine-readable pricing files, though the cleaning and reshaping steps may need adjustments based on the file structure.

Get FREE Advanced Excel Exercises with Solutions!

Shamima Sultana
Shamima Sultana

Shamima Sultana has been working with the ExcelDemy project for 4+ years. She has written and reviewed 1,500+ articles for ExcelDemy and has led several teams in Excel VBA and content development. She currently works as the Technical Content Specialist and Data Analyst for ExcelDemy, Statology, and KDnuggets, and oversees the site's technical content, forum, and YouTube content. Her work and learning interests range from automation in Microsoft Office, Google Workspace, and Excel to data analysis, data science,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo