Forum Discussion

Julie_'s avatar
Julie_
Frequent Visitor
3 years ago
Solved

Check if two dates match

Hello guys,   I need to write a measure to check if two Dates match. the two tables are connected between the serial number.   I already tried: IF(table1[ChequeDate] = RELATED(table2[Inst...
  • Martin_D's avatar
    3 years ago

     

     

    Matching Date Test =
    IF (
        SELECTEDVALUE ( table1[ChequeDate] ) = SELECTEDVALUE ( table2[InstallationDate] )
        // prevent returning 0 if blank = blank because multiple dates were included in the context:
        && HASONEVALUE ( table1[ChequeDate] ) && HASONEVALUE ( table2[InstallationDate] )
        0,
        1
    )