extrobe
1/31/2017 - 1:56 PM

Calculate Correct Due Date From Terms

Calculate Correct Due Date From Terms

CorrectDueDate =
IF (
    RELATED ( Terms[TermsDays] ) = 45,
    EOMONTH ( LEDGER[InvoiceDate] + 30, 0 )
        + 15,
    EOMONTH ( LEDGER[InvoiceDate] + RELATED ( Terms[TermsDays] ), 0 )
)