IF Condition with CALCULATE

Hello, I have created a column to compare values in 2 linked tables called S3 and RS.

Match Flag = IF( S3[Department] = RELATED(RS[Department]), "Match", "Unmatch")

This is working fine. But instead of a column I want to create a measure. Could anyone please help.

Thanks

Grace

Use a pattern like this

Related Example = 
VAR Lookup = LOOKUPVALUE( 'Product'[Product ID], 'Product'[Product ID], SELECTEDVALUE( Sales[Product ID] ) )

RETURN
IF( SELECTEDVALUE( Sales[Product ID] ) = Lookup,
    "Match",
        "Unmatch" )

Just sub in the correct parameters into this one

1 Like

Thanks Sam !!