- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Summing Sales between two different date fields
I have sales in Invoice Line Items table with an invoice date and I need to sum those sales between two dates - the Check In and Check Out dates in the Hotel Reservation table. So essentially summing sales when the invoice date is on or between the check in and check out dates.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@M_BODNER , A new column Reservation
sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value])
or
Try a measure like
Sumx(Reservation,
sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value]) )
or
Sumx(Reservation,
calculate( sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value]) ) )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you!!! Your second suggestion worked like a charm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@M_BODNER , A new column Reservation
sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value])
or
Try a measure like
Sumx(Reservation,
sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value]) )
or
Sumx(Reservation,
calculate( sumx(filter(Invoice, Invoice[Date]>= Reservation[Check in] && Invoice[Date]<= Reservation[Check out]), Invoice[Value]) ) )

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-10-2024 04:24 AM | |||
06-04-2024 09:06 AM | |||
11-08-2023 11:16 AM | |||
06-20-2024 04:54 AM | |||
08-06-2024 11:44 PM |
User | Count |
---|---|
83 | |
78 | |
52 | |
37 | |
36 |
User | Count |
---|---|
104 | |
85 | |
47 | |
44 | |
43 |