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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Infrecon
Frequent Visitor

Hospital bed occupancy per ward

Hello together

I am relatively new to Power BI, have worked a lot with Tableau.

I have the following tables:

Case Data:

Case_IDAdmission date and timeDischarge date and timeWard...
2021_KSSS2031332401.09.2021 11:3011.09.2021 13:00S32 
2021_KSSS2031312429.08.2021 07:0031.08.2021 11:00S11 

Ward statistics

DateWardOccupiable beds
29.08.2021S3235
29.08.2021S1118
30.08.2021S3235

 

Now to my question. There are many other parameters in the case data (e.g. length of stay, age, etc.).

1. how do I have to set up the data model? I started with a Dim_Date table and a Dim_Time table, because the data set covers several years.
How do I link the two tables Case Data and Bed Statistics? I tried it with a many:1 relationsship on departments, but it always tells me only many:many possible

2. how can i show the following analysis in a matrix table:

What is the average number of patients per hour in the day, versus the average number of beds available, that by wards.

Ward012345..
S35121212121212..
        

 

Sorry I struggle a bit just now.

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Infrecon ;

I tried your table, but it is not very clear how your 12 values for 0-12 hours come from. Can you make a simple example and the results you want to output? This will allow me to better understand. Will the hourly average of another day be displayed every day? Then the vision is bigger.

vyalanwumsft_0-1634006866457.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, @v-yalanwu-msft 

 

Thanks for your support. Attached you'll find a dummy project with a certain amount of dummy datas. So far i have added the Dim_Date and Dim-Time Table.  But currently unsure about the relationsship.

 

From the data you can see what parameters are available. I would now like to visualize the following representation:

 

How many patients are on the corresponding ward per time unit on average. This time unit should be dynamic. That is, I can either display it per day, per year or per hour.

 

Attached is an example on the days:

Patients per day

 05.01.202106.01.202107.01.2021
S12367
S32467
S44234

 

Number of occupiable beds per day

 05.01.202106.01.202107.01.2021
S12161616
S32132812
S44192312

 

Average occupancy per day

 05.01.202106.01.202107.01.2021
S1218.8%37.5%43.8%
S3230.8%21.4%58.3%
S4410.5%13.0%33.3%

 

Also, you should be able to show a progression, for example, in the following way:

Case_ID03.01.202104.01.202105.01.202106.01.202107.01.202108.01.202109.01.202110.01.2021
2021_SCAS123123111111111
2021_SCAS12315834111111  
2021_SCAS18412512 1111111
2021_SCAS84234015 1111111
YukiK
Impactful Individual
Impactful Individual

Firstly, I recommend spliting the datetime column in case data table into date and time, so as to connect to both date dim table and time dim table.

 

When you said you tried to create a relationship on department, I assume you meant ward. Ward statistics table is like an aggregate dim table and it looks like its grain is per row per date + ward. You can't make a relationship on multiple columns in power bi, so you'd want to a key column to ward statistics table that defines each row uniquely, and then join that table on to the case data table on date and ward columns and only leave the key column of ward statistics table in the case data table so that you can join these tables on this key column. This should allow you to make a one-to-many relationship between these tables. And create relationships between case data and date table and time table.

 

To create a matrix table you mentioned, you bring in the matrix visual wherein you put ward on the rows and hours on the columns, and your measure on to the values.

 

Hope this helps!

 

 

 

 

YukiK
Impactful Individual
Impactful Individual

Another way is to create a table that contains each ward and this table will be used as a bridge table between case data table and ward statistics table.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.