---
title: How to Calculate Length of Stay in Power BI
description: It is critical in Health and Human Services to have a good sense of your program Length of Stay.  Learn how to calculate and analyze LOS in Power BI.
---

[Blog ](https://www.qifolio.com/blog)

# [How to Calculate Length of Stay in Power BI](https://www.qifolio.com/blog/how-to-calculate-length-of-stay-in-power-bi)

 Written by [Tristan Keelan](https://www.qifolio.com/blog/author/tristan-keelan) | Jan 7, 2021 5:37:15 AM

## Overview

This tutorial demonstrates how you can use admission dates and discharge dates to calculate Length of Stay.  This is an important measure in all Health and Human Services programs, as it indicates how long clients are active in a program.

Good ways to use Length of Stay are to evaluate it against other categories for example, successful vs unsuccessful discharges.  Are there substantial differences in Length of Stay for what it takes to produce successful outcomes?  The answer to that question is a valuable one for understanding how long an episode of care will require to make the desired impact.  It is also valuable for Value Based Payment contracts to demonstrate that success can be achieved within a reasonable period of time, and therefore costs to insurance providers.

Target Length of Stay will vary substantially across program types; however, it is generally assumed that a shorter period is better, as long as you can also produce successful outcomes.  You may want to start by analyzing your average Length of Stay to help determine what a good target Length of Stay should be.

Another positive use for this calculation is to be able to filter out outliers.  When doing internal quality analysis, there may be times when extremely short or extremely long Length of Stays could be considered outliers.  For example, you might want to look at [No Show Rate](https://www.qifolio.com/blog/how-to-calculate-no-show-rate-in-power-bi), but only for clients who have been in program for at least 90 days.

## Formulas Used

**Column:**

*Days Between Admit and Discharge = DATEDIFF('Chart Data - Sample'[Date - Admit].[Date],'Chart Data - Sample'[Date - Discharge].[Date],DAY)*

 

*Reminder that formulas will have to use fields from your own data set. eg 'Your Table'[Your Field]

 

If you have any questions post them in the comments below.

For more video tutorials about reporting Behavioral and Mental Health Data: [Click Here >>](https://www.qifolio.com/resources/behavioral-mental-health-data-calculations)

[View full post](https://www.qifolio.com/blog/how-to-calculate-length-of-stay-in-power-bi)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Tristan Keelan"
  },
  "dateModified" : "2021-01-07T06:05:17.221Z",
  "datePublished" : "2021-01-07T05:37:15Z",
  "headline" : "How to Calculate Length of Stay in Power BI",
  "image" : {
    "@type" : "ImageObject",
    "height" : 720,
    "url" : "https://f.hubspotusercontent30.net/hubfs/8470389/custom-video-thumbnails/How%20to%20Calculate%20Length%20of%20Stay%20in%20Power%20BI-thumb.jpeg",
    "width" : 1280
  },
  "mainEntityOfPage" : "https://www.qifolio.com/blog/how-to-calculate-length-of-stay-in-power-bi",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://f.hubspotusercontent30.net/hubfs/8470389/FullColor-2.png",
      "width" : 72.36876
    },
    "name" : "QI Folio Blog"
  }
}
```