Forum Discussion

gwoodley's avatar
gwoodley
Frequent Visitor
1 year ago
Solved

Check if Dates are same, but only when another column value exists in another column.

Hi, I'm a little stuck here, I'm trying to compare a date column to see if the dates are the same, but only if a value in a one column first exists in another column.   All columns are on the same ...
  • DataInsights's avatar
    1 year ago

    gwoodley,

     

    Try this calculated column:

     

    Match = 
    VAR vParentOrder = 'Table'[Parent Order#]
    VAR vDate = 'Table'[Date]
    VAR vTable =
        FILTER (
            'Table',
            'Table'[Order#] = vParentOrder
                && 'Table'[Date] = vDate
        )
    VAR vResult =
        IF ( ISEMPTY ( vTable ), "No", "Yes" )
    RETURN
        vResult