Forum Discussion

bonjourposte's avatar
bonjourposte
Icon for Helper V rankHelper V
2 years ago
Solved

DAX help with FILTER(RELATEDTABLE)

I have two tables with an active one-to-many relationship: the loan table (LOANMAST) and the interested party table (LOAN_IPT). LOANMAST is on the "one" side, and LOAN_IPT is on the "many" side, bec...
  • parry2k's avatar
    2 years ago

    bonjourposte try this 

     

    Current Broker Column = 
    MAXX ( 
        FILTER(
            RELATEDTABLE(LOAN_IPT), 
            LOAN_IPT[INTEREST] = "BROKER" && 'END_DATE' = "null"
        ),
        LOAN_IPT[SHORT_NAME]
    )
  • bonjourposte's avatar
    bonjourposte
    2 years ago

    So, I figured it out. 

     

    I tried what you gave me, but I got this error:

     

    I realized it doesn't like text coming from a date column.  This is what my END_DATE column looked like:

     

     

    So I changed the DAX slightly to replace

    "&& LOAN_IPT 'END_DATE'='null'"

    to

    "&& ISBLANK(LOAN_IPT[END_DATE]": 

     
    BROKER NEW COLUMN = MAXX(FILTER(RELATEDTABLE(LOAN_IPT),LOAN_IPT[INTEREST] = "BROKER" && ISBLANK(LOAN_IPT[END_DATE])),LOAN_IPT[SHORT_NAME])
     
    And it worked!!  THANKS SO MUCH!!