Forum Discussion

jpdickson12's avatar
jpdickson12
Frequent Visitor
3 years ago
Solved

Filtering Out Specific String in One Field Within an Average Measure That Uses a Relationship

I have a field called 'Loans'[DTI]   I want to calculate the Average of this field using the relationship 'Date'[Date], 'Loans'[Funded Date] while also filtering out any records that have the 'Loan...
  • ERD's avatar
    3 years ago

    jpdickson12 , syntax:

    AVG Funded DTI =
    CALCULATE (
        AVERAGE ( Loans[DTI] ),
        FILTER (
            'Loans',
            NOT ( CONTAINSSTRING ( 'Loans'[Loan Program Name], "DSCR" ) )
        ),
        USERELATIONSHIP ( 'Date'[Date], Loans[Funded Date] )
    ) / 100