Ravindra BagaleCourses & study guides मराठी Track your progress

27. 20 Industry Projects

Excel

27.7 Healthcare: Hospital Revenue and Length of Stay

Example first. Zoya manages admissions for a fictional hospital group and wants a weekly view of revenue and how long patients stay.

Healthcare project — in 30 seconds

What: A Healthcare tracker: one Table tblVisits, the calculated column RevPerDay, KPI cells, a PivotTable by City, a chart and a one-page dashboard.

Why: This is the shape of a real Healthcare report: Total Revenue, Average Length of Stay (days), Revenue per Patient are the numbers a manager reads first.

Tiny example: From 6 rows: Total Revenue = ₹6,34,000, Average Length of Stay (days) = 3.5, Revenue per Patient = ₹105,666.67.

First look at the data (before → after):

Healthcare project: before and after tables, fictional FreshGo Maharashtra data

Expected result — Calculated column

PatientID RevPerDay
PT-901 ₹37,000.00
PT-902 ₹32,000.00
PT-903 ₹24,000.00
PT-904 ₹35,000.00
PT-905 ₹22,000.00
PT-906 ₹15,500.00

About this data: Teaching sample for a fictional shop “QuickCart Delivery”. Figures and names (e.g. Vikram Rao) are made up for this lesson on healthcare hospital revenue and length of stay.

Expected result — KPI cells (expected results)

KPI Formula Result
Total Revenue =SUM(tblVisits[Bill]) ₹6,34,000
Average Length of Stay (days) =AVERAGE(tblVisits[StayDays]) 3.5
Revenue per Patient =SUM(tblVisits[Bill])/ROWS(tblVisits[Bill]) ₹105,666.67

About this data: Demo table only — not real customer or company data. Built to practise healthcare hospital revenue and length of stay.

Before table and formula as text

Before — Table tblVisits (fictional sample rows)

PatientID City Dept Bill StayDays
PT-901 Pune Cardiology 1,85,000 5
PT-902 Pune Orthopaedics 96,000 3
PT-903 Nashik General 24,000 1
PT-904 Nagpur Cardiology 2,10,000 6
PT-905 Sambhaji Nagar Orthopaedics 88,000 4
PT-906 Nashik General 31,000 2

About this data: Made-up rows so you can copy the pattern for healthcare hospital revenue and length of stay. Currencies may use ₹, £, € or $.

Formula / click path

RevPerDay: =[@Bill]/[@StayDays]
Total Revenue: =SUM(tblVisits[Bill])
Average Length of Stay (days): =AVERAGE(tblVisits[StayDays])
Revenue per Patient: =SUM(tblVisits[Bill])/ROWS(tblVisits[Bill])

Do it step by step:

  1. Type the data and press Ctrl+T; name the Table tblVisits in Table Design › Properties › Table Name.
  2. Add the column RevPerDay with =[@Bill]/[@StayDays]; the Table fills it down.
  3. On a KPI sheet type =SUM(tblVisits[Bill]) and the other KPI formulas from the table below.
  4. Click Insert › PivotTable › From Table/Range, put City in Rows and Bill in Values (Sum).
  5. Click PivotTable Analyze › PivotChart › Clustered Column, then PivotTable Analyze › Insert Slicer › Dept.
  6. Move the KPI cells, the chart and the slicer onto a sheet named Dashboard.

The brief. Build a hospital sheet: revenue per bed-day, total revenue, average length of stay, revenue per patient, revenue by city, a chart and a Dept slicer. Patient IDs only; no names or medical details.

Calculated column formulas:

Column Formula
RevPerDay =[@Bill]/[@StayDays]

About this data: Fictional worksheet used in class. Safe to edit; nothing here is live production data.

KPI cells (check your numbers):

KPI Formula Result
Total Revenue =SUM(tblVisits[Bill]) ₹6,34,000
Average Length of Stay (days) =AVERAGE(tblVisits[StayDays]) 3.5
Revenue per Patient =SUM(tblVisits[Bill])/ROWS(tblVisits[Bill]) ₹105,666.67

About this data: Teaching sample for a fictional shop “QuickCart Delivery”. Figures and names (e.g. Vikram Rao) are made up for this lesson on healthcare hospital revenue and length of stay.

PivotTable (expected):

City Sum of Bill
Nagpur ₹2,10,000
Nashik ₹55,000
Pune ₹2,81,000
Sambhaji Nagar ₹88,000
Grand Total ₹6,34,000

About this data: Demo table only — not real customer or company data. Built to practise healthcare hospital revenue and length of stay.

Chart and dashboard (one under the other):

  1. Click inside the PivotTable, then PivotTable Analyze › PivotChart › Clustered Column › OK.
  2. Add a chart title and data labels with Chart Design › Add Chart Element.
  3. Click PivotTable Analyze › Insert Slicer, tick Dept and click OK.
  4. Insert a new sheet named Dashboard. In it, link a card cell to each KPI (for example =KPI!B2) and format it large and bold.
  5. Cut and paste the chart and slicer onto the Dashboard sheet.
  6. On the View tab, untick Gridlines in the Show group. Select the dashboard area and click Page Layout › Print Area › Set Print Area.

Template and guide: download the practice template Healthcare_Template.xlsx and read the step-by-step template guide. The template's sample rows may differ from the rows above; the method is the same.

Related ready-made dashboard: the Healthcare dashboard guide and its workbook Hospitals_Dashboard.xlsx show a finished version of this kind of report.

Practice task (try it before you open the answer):

  1. Which city has the highest sum of Bill?
  2. Filter the Table on City = Pune (Data › Filter): what is Total Revenue for Pune alone?
  3. Add the Clustered Column PivotChart and the Dept slicer to your Dashboard sheet.
Answer

Pune (₹2,81,000). For Pune only (2 rows): Total Revenue = ₹2,81,000. The chart shows 4 bars, one per city.

Ravindra Bagale's Tip

Keep the calculated column RevPerDay inside the Table. New rows then get the formula automatically, and the PivotTable only needs Refresh.

Loading practice tasks...

  1. Total days admitted (Easy): Add up Days admitted in D2:D11.
  2. Average bill amount (Easy): Average of the Bill amount (₹) column, rounded to 2 decimals.
  3. Rows in Cardiology (Easy): How many rows have Department "Cardiology"?
  4. Largest days admitted (Easy): The largest value in D2:D11.
  5. Days admitted for Cardiology (Medium): Total of the Days admitted column where Department is "Cardiology".
  6. Cardiology in Mumbai (Medium): Total of the Days admitted column where Department is "Cardiology" and City is "Mumbai".
  7. Best in Cardiology (Medium): Largest E2:E11 value where B is "Cardiology".
  8. Value of row 2 (Medium): Multiply the first-row Days admitted by the first-row Bill amount (₹).
  9. Look up Sophie Martin (Medium): The Days admitted for "Sophie Martin" (use a lookup on column A).
  10. Total value (Hard): Sum of D times E for all rows.
  11. Share of Cardiology (Hard): Share of D2:D11 that is "Cardiology", rounded to 3 decimals.
  12. How many rows are above the average "Bill amount (₹)" (Hard): Count the rows where "Bill amount (₹)" is above the average "Bill amount (₹)".
  13. Above average? (Hard): "Above" if E2 is above the average of E2:E11, else "Below".