Forum Discussion

apmulhearn's avatar
apmulhearn
Helper III
5 years ago
Solved

Help with Join with Date-Specific Contingencies

Hello!   I have two tables.   I need to join them for attribution purposees. These are the criteria I need to be true: 1. Inquiries are joined on Client ID between tables 2. Inquiries are asso...
  • ryan_mayu's avatar
    5 years ago

    apmulhearn 

    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])