Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
45 | |
26 | |
22 | |
12 | |
7 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |