Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Whitewater100
Solution Sage
Solution Sage

Days to Complete a process

Hello Community:

I am trying to compare the hospitals on how many days does it take on average(Hospital Average) to get thru all four treatments. 

I will insert link for file with explanation on page 3. The data is  not exact - just showing one possible result.

 

I will also paste below an an example on how I got the averages for the NC Hospital for each step.

 

Thanks for any input on getting the Hospital Average to Cover(Days) the range of Steps 1 thru 4, able to be totalled and also filterable by hosptial or patient.

 

https://drive.google.com/file/d/1snUbqhFrNDCKNyFBhJAa4Nnyg_dxabbB/view?usp=sharing

 

HosptPatientTypeStepTime InTime OutDaysForumla  
NCARadiologyStep 15/2/2022 12:05 p.m.5/2/2022 1:05 p.m.1   
NCBRadiologyStep15/2/2022 1:05 p.m.5/2/2022 3:05 p.m.1   
NCARadiologyStep 25/4/2022 12:05 p.m.5/4/2022 1:05 p.m.1.95Time out 5-04 -Time Out 5-02
NCBRadiologyStep 25/4/2022 1:05 p.m.5/4/2022 2:05 p.m.1.95Time out 5-04 -Time Out 5-02
NCARadiologyStep 35/9/2022 12:05 p.m.5/9/2022 1:05 p.m.5Time out 5-09 -Time Out 5-04
NCBRadiologyStep 35/9/2022 1:05 p.m.5/9/2022 2:05 p.m.5Time out 5-09 -Time Out 5-04
NCARadiologyStep 45/16/2022 12:05 p.m.5/16/2022 2:05 p.m.7.04Time out 5-16 -Time Out 5-09
NCBRadiologyStep 45/16/2022 1:05 p.m.5/16/2022 2:05 p.m.7Time out 5-16 -Time Out 5-09
    AVG DAYS (all patients)     
  NCStep 11     
  NCStep 21.95     
  NCStep 35     
  NCStep 47.02     
   Tot Avg14.97 

The finaloutput would directionally look like this:

Whitewater100_0-1654781946365.png

Thanks!

 

 

1 ACCEPTED SOLUTION
vapid128
Solution Specialist
Solution Specialist

vapid128_0-1654823563561.png

 

vapid128_1-1654823603289.png

 

In Table add colnum

days = 
if([Step_ID]=1,
    1,
    [Time Out]-LOOKUPVALUE('Table'[Time Out],'Table'[Step_ID],'Table'[Step_ID]-1,'Table'[Patient_ID],'Table'[Patient_ID])
)

 

add measure

aveDays = AVERAGEX(VALUES('Table'[Patient_ID]),CALCULATE(SUM('Table'[days])))

View solution in original post

2 REPLIES 2
vapid128
Solution Specialist
Solution Specialist

vapid128_0-1654823563561.png

 

vapid128_1-1654823603289.png

 

In Table add colnum

days = 
if([Step_ID]=1,
    1,
    [Time Out]-LOOKUPVALUE('Table'[Time Out],'Table'[Step_ID],'Table'[Step_ID]-1,'Table'[Patient_ID],'Table'[Patient_ID])
)

 

add measure

aveDays = AVERAGEX(VALUES('Table'[Patient_ID]),CALCULATE(SUM('Table'[days])))

Thanks very much. Nice job!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.