Forum Discussion
Help with Join with Date-Specific Contingencies
- 5 years ago
you can use DAX to create two columns
Booking_name = var _date=MINX(FILTER(Guests,Guests[Client_ID]=Inquiries[Client_ID]&&Guests[First_Payment_Date]>Inquiries[Created_On]),Guests[First_Payment_Date]) return maxx(FILTER(Guests,Guests[Client_ID]=Inquiries[Client_ID]&&Guests[First_Payment_Date]=_date),Guests[Booking_Name]) First_payment_Date = var _date=MINX(FILTER(Guests,Guests[Client_ID]=Inquiries[Client_ID]&&Guests[First_Payment_Date]>Inquiries[Created_On]),Guests[First_Payment_Date]) return maxx(FILTER(Guests,Guests[Client_ID]=Inquiries[Client_ID]&&Guests[First_Payment_Date]=_date),Guests[First_Payment_Date])
ryan_mayu - you gave me exactly what I asked, thank you, and I marked it as a solution.
I realize though that I need to take it a step more. I believe I need a measure but I'm a little stuck as to what it is.
The image below is using Inquires[Booking_Name} and Charting it under other Inquiries fields.
The three lines with the blue dots are the same Inquiries[Booking_Name] line because it is associated with 3 different Inquiries.
I would like it only to highlight the one with the earliest Inquiries [Created Date] (not used in the graphic). Can you help me here?
- ryan_mayu5 years ago
Super User
could you pls share the pbix file after removing the sensitive data?
- apmulhearn5 years ago
Helper III
It is loaded with sensitive data and will take me a bit of time to remove, but you are helping me, so I will gladly do it!
In the meantime, though, I think I can exemplify it based on the small sample you helped me with above. If this doesn't help I will circle back asap.
- ryan_mayu5 years ago
Super User
why not use the opposite way to search data? searching from Inquiries table instead of searching from guest table.
pls see the attachment below