Forum Discussion

petehorsch's avatar
petehorsch
Frequent Visitor
3 years ago
Solved

How many guests on a certain day

I have a spreadsheet that lists client check-in and check-out dates. What I'd like to be able to do is report on the number of clients that were staying on a given day.   What's a good way to be abl...
  • v-henryk-mstf's avatar
    3 years ago

    Hi petehorsch ,

     

    You can try below formula:

    mount =
    VAR sel =
        SELECTEDVALUE ( 'Date'[Date] )
    RETURN
        CALCULATE (
            COUNTROWS ( 'Table' ),
            'Table'[Start_date] <= sel
                && 'Table'[Leave_date] >= sel
        )

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.