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
wellington491
4 years agoNew Member
Hello SteveHailey Thank you very much, it worked perfectly.
Follow the result below.
Taking advantage of the opportunity, can you kindly let me know how I can hide in the visual, the lines that already have past dates?
Once again, thank you very much for your attention.
SteveHailey
4 years agoSolution Specialist
You're welcome! I think the simplest way to hide rows that have past dates would be to select the table, and then in the filter pane add a Relative date filter; something like what is shown below:
It could also be done with DAX if you don't love the above method.