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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Roseventura
Responsive Resident
Responsive Resident

Comparing Dates between 2 unrelated tables

I have two tables: 

1.  Quotes table - Quote #, Line, Quote Date, Part #, Customer, Qty, Price

2.  Bookings table - Customer, Part #, Booking Date, Qty, Price

 

I have a date table to which both dates are joined.

 

I'm trying to show which parts have been booked against the same part and the same customer in the Quote table, but ONLY if the Booking date is > than the Quote date.

 

Here's the measure I created, which is not working (Measure 1):

    POS $ After Quote Period =

CALCULATE (
[Subset POS $$ of Quote],
FILTER (
ALL ( PBI_Disti_NICPoscy ),
     (
PBI_Disti_NICPoscy[Formatted POS Last Date] > max( PBI_QuoteLQT_CY[Formatted Load Date] )
)))
 
where [Subset POS $$ of Quote] is the total value of the booking where Booking[Part #] = Quote[Part #] and Booking[Customer] = Quote[Customer]. Here's that measure (Measure 2):
Subset POS $$ of Quote =
CALCULATE (
[Total POS Resale $$],
FILTER (PBI_Disti_NICPoscy,
contains( values( PBI_QuoteLQT_CY ) , PBI_QuoteLQT_CY[NIC PART NUMBER] , PBI_Disti_NICPoscy[Part #] , PBI_QuoteLQT_CY[End Customer Group], PBI_Disti_NICPoscy[End Customer Group])))
 
When I try to insert Measure 1 into my table, it errors or shows nothing. Basically, what I'm trying to do is achieve the same result if I were to use a date filter on the Booking Date.
 
Here's what I'm getting now. The Booking Date is not being filtered so I'm getting ALL bookings regardless of when they were booked.
 
Capture 45.JPG
 
If I use a date filter for Booking date, I can get the results I need. But I need to incorporate this into my measures for Booking Qty and Booking Price:
 
Capture 46.JPG
3 REPLIES 3
amitchandak
Super User
Super User

@Roseventura ,Can you share sample data and sample output in table format?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I don't have the ability to upload PBIX files to this forum.  My company firewall prevents me from doing so.

 

 

@Roseventura , paste some sample data in table format. Share expected output too

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.