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.
Healthcare project — 30 सेकंदात
काय: Healthcare चा tracker: tblVisits नावाची एक Table, RevPerDay हा calculated column, KPI cells, City प्रमाणे PivotTable, एक chart आणि एका पानाचा dashboard.
का: खऱ्या Healthcare report चा हाच आकार असतो: Total Revenue, Average Length of Stay (days), Revenue per Patient हे आकडे manager सगळ्यात आधी वाचतो.
छोटं उदाहरण: 6 rows मधून Total Revenue = ₹6,34,000, Average Length of Stay (days) = 3.5, Revenue per Patient = ₹105,666.67.
Healthcare project — 30 सेकंड में
क्या: Healthcare का tracker: tblVisits नाम की एक Table, RevPerDay calculated column, KPI cells, City के हिसाब से PivotTable, एक chart और एक पन्ने का dashboard.
क्यों: असली Healthcare report का यही आकार होता है: Total Revenue, Average Length of Stay (days), Revenue per Patient वे आँकड़े हैं जो manager सबसे पहले पढ़ता है.
छोटा उदाहरण: 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):
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 |
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 |
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 |
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:
- Type the data and press Ctrl+T; name the Table
tblVisitsin Table Design › Properties › Table Name. - Add the column RevPerDay with
=[@Bill]/[@StayDays]; the Table fills it down. - On a KPI sheet type
=SUM(tblVisits[Bill])and the other KPI formulas from the table below. - Click Insert › PivotTable › From Table/Range, put City in Rows and Bill in Values (Sum).
- Click PivotTable Analyze › PivotChart › Clustered Column, then PivotTable Analyze › Insert Slicer › Dept.
- Move the KPI cells, the chart and the slicer onto a sheet named Dashboard.
स्टेप बाय स्टेप करून बघा:
- Data type करा आणि Ctrl+T दाबा; Table Design › Properties › Table Name मध्ये Table ला
tblVisitsनाव द्या. - RevPerDay column
=[@Bill]/[@StayDays]ने जोडा; Table तो खाली भरते. - KPI sheet वर
=SUM(tblVisits[Bill])आणि खालच्या table मधले बाकीचे KPI formulas type करा. - Insert › PivotTable › From Table/Range वर click करा, Rows मध्ये City आणि Values मध्ये Bill (Sum) ठेवा.
- PivotTable Analyze › PivotChart › Clustered Column वर click करा, मग PivotTable Analyze › Insert Slicer › Dept.
- KPI cells, chart आणि slicer Dashboard नावाच्या sheet वर हलवा.
स्टेप बाय स्टेप करके देखें:
- Data type करें और Ctrl+T दबाएँ; Table Design › Properties › Table Name में Table को
tblVisitsनाम दें. - RevPerDay column
=[@Bill]/[@StayDays]से जोड़ें; Table उसे नीचे भर देती है. - KPI sheet पर
=SUM(tblVisits[Bill])और नीचे की table के बाकी KPI formulas type करें. - Insert › PivotTable › From Table/Range पर click करें, Rows में City और Values में Bill (Sum) रखें.
- PivotTable Analyze › PivotChart › Clustered Column पर click करें, फिर PivotTable Analyze › Insert Slicer › Dept.
- KPI cells, chart और slicer को Dashboard नाम की sheet पर ले जाएँ.
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] |
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 |
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 |
Chart and dashboard (one under the other):
- Click inside the PivotTable, then PivotTable Analyze › PivotChart › Clustered Column › OK.
- Add a chart title and data labels with Chart Design › Add Chart Element.
- Click PivotTable Analyze › Insert Slicer, tick Dept and click OK.
- 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. - Cut and paste the chart and slicer onto the Dashboard sheet.
- 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):
- Which city has the highest sum of Bill?
- Filter the Table on City = Pune (Data › Filter): what is Total Revenue for Pune alone?
- 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.
Ravindra Bagale's Tip – मराठी
RevPerDay हा calculated column Table च्या आतच ठेवा. मग नवीन rows ना formula आपोआप मिळतो, आणि PivotTable ला फक्त Refresh लागतं.
Ravindra Bagale's Tip – हिंदी
RevPerDay calculated column को Table के अंदर ही रखें. फिर नई rows को formula अपने आप मिलता है, और PivotTable को सिर्फ़ Refresh चाहिए.
Loading practice tasks...
- Total days admitted (Easy): Add up Days admitted in D2:D11.
- Average bill amount (Easy): Average of E2:E11, rounded to 2 decimals.
- Rows in Cardiology (Easy): How many rows have Department "Cardiology"?
- Largest days admitted (Easy): The largest value in D2:D11.
- Days admitted for Cardiology (Medium): Total of D2:D11 where B is "Cardiology".
- Cardiology in Mumbai (Medium): Total of D2:D11 where B is "Cardiology" and C is "Mumbai".
- Best in Cardiology (Medium): Largest E2:E11 value where B is "Cardiology".
- Value of row 2 (Medium): D2 times E2.
- Look up Sophie Martin (Medium): The Days admitted for "Sophie Martin" (use a lookup on column A).
- Total value (Hard): Sum of D times E for all rows.
- Share of Cardiology (Hard): Share of D2:D11 that is "Cardiology", rounded to 3 decimals.
- Rank of row 2 (Hard): Rank of D2 among D2:D11 (largest = 1).
- Above average? (Hard): "Above" if E2 is above the average of E2:E11, else "Below".