Forum Discussion

wellington491's avatar
wellington491
New Member
4 years ago
Solved

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...
  • SteveHailey's avatar
    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
        Result
    Children =
    VAR CurrentDate =
        MAX ( Dates[Date] )
    VAR Result =
        CALCULATE (
            SUM ( Data[CHD] ),
            Data[INPUT] <= CurrentDate
                && Data[OUTPUT] > CurrentDate
        )
    RETURN
        Result