Forum Discussion

Hamdan1234's avatar
Hamdan1234
Helper III
4 years ago
Solved

DAX Formula

I had this below table.  Course ABC1 ABC2 ABC3 Duration 36 Months 24 Months 18 Months Asst Manager Y N Y AD Y N Y CEO N Y N COO N N Y Manager Y Y N to w...
  • smpa01's avatar
    4 years ago

    Hamdan1234  you can use following two measures to achieve what you need after the very final merge

     

    ValidUntil = 
    VAR _0 = ADDCOLUMNS('Table',"ValidTill", 'Table'[Completion Date]+(CONVERT(LEFT('Table'[Duration],2),INTEGER)*DIVIDE(365,12)))
    RETURN MAXX(_0,[ValidTill])
    
    isValidNow = SWITCH(true(),[ValidUntil]<=TODAY(),"Non COmpliant","Compliant")