Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 18 | |
| 14 | |
| 14 |