Forum Discussion
wellington491
4 years agoNew Member
Availability Table
Hello, I'm creating a dashboard to display the future occupancy of a hotel's apartments, based on information from the reservations that have been made in the system. But I found myself in a probl...
- 4 years ago
Hello wellington491. Something like the measures below should work.
I created a .pbix here in case it's helpful.
Adults = VAR CurrentDate = MAX ( Dates[Date] ) VAR Result = CALCULATE ( SUM ( Data[ADULT] ), Data[INPUT] <= CurrentDate && Data[OUTPUT] > CurrentDate ) RETURN ResultChildren = VAR CurrentDate = MAX ( Dates[Date] ) VAR Result = CALCULATE ( SUM ( Data[CHD] ), Data[INPUT] <= CurrentDate && Data[OUTPUT] > CurrentDate ) RETURN Result
SteveHailey
4 years agoSolution Specialist
Hello wellington491. Something like the measures below should work.
I created a .pbix here in case it's helpful.
Adults =
VAR CurrentDate =
MAX ( Dates[Date] )
VAR Result =
CALCULATE (
SUM ( Data[ADULT] ),
Data[INPUT] <= CurrentDate
&& Data[OUTPUT] > CurrentDate
)
RETURN
ResultChildren =
VAR CurrentDate =
MAX ( Dates[Date] )
VAR Result =
CALCULATE (
SUM ( Data[CHD] ),
Data[INPUT] <= CurrentDate
&& Data[OUTPUT] > CurrentDate
)
RETURN
Result