Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
petehorsch
Frequent Visitor

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 able to generate a value (that I could report individually or graph over time) that would report the number of guests we had staying with us on those days?  

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

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
    )

vhenrykmstf_0-1669624433561.png

vhenrykmstf_1-1669624445313.png

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.

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

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
    )

vhenrykmstf_0-1669624433561.png

vhenrykmstf_1-1669624445313.png

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.

petehorsch
Frequent Visitor

How do I create the 'Date'[Date} value you reference?

 

Shaurya
Memorable Member
Memorable Member

Hi @petehorsch,

 

You can use:

 

Count = CALCULATE(DISTINCTCOUNT('Table'[Guest]),FILTER('Table','Table'[Check In Date]<='Date'[Date]&&'Table'[Check Out Date]>='Date'[Date]))

 

Works for you? Mark this post as a solution if it does!
Check out this blog of mine: How to Export Telemetry Data from Azure IoT Central into Power BI

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.