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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Count Day for ocuppation rate

I need to create on dashboard para show the ocuppation rate in the bedrooms of one hotel.

The table have the follow columns:

Date of check-in - Date of check-out - Amount days

For example, one guest arrive 06/25/2019 and go out 07/10/2019, logo he stayed 15 days.

In dashboard I have one Slicer for my table calendar and if the user to filter for 06/01/2019 until 06/30/2019, the example to up, has to return 10 days.

And, if the filter is for a longer period, for example 06/01/2019 until 07/31/2019, has to return only 15 days.

 

So, before sum the days, I need compare if(max(calendar[date] < Date of check-out)

 

How to make this?

1 REPLY 1
Cmcmahan
Resident Rockstar
Resident Rockstar

You should just be able to just use something like this without doing any comparisons to count the days.

Occupancy = SUMX('table', COUNTROWS(DATESBETWEEN('calendar'[date], 'table'[Date of check-in], 'table'[Date of check-out])))

  

If you could share a set of sample data/expected outputs, that would be very helpful in getting you a more accurate answer.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.