Forum Discussion

awolf88's avatar
awolf88
Helper II
4 years ago
Solved

Matching 2 Columns from 2 Tables - Measure or Filter needed to show values not listed in the other

Dear community,

 

having a bit of a riddle here and I can't wrap my head around the easiest way of how to approach this:

I have 3 Tables from 3 sources ("Master List", "Sales", "Order Entry"). All contain a text combination of Customer&Product. 

As depicted, at first I wanted to combine the "Sales" & "Order Entry" table so we are left with 2. I've compled that step via merging tables. 

 

Now what I'm after is a Measure (or FILTER if possible!) to be left with all values from the combined "Sales & Order Entry" that do not occur in the MASTER LIST. 

 

Appreciate any input as always. 

Thanks in advance!

  • awolf88,

     

    Try this calculated column in the Sales and Order Entry table:

     

    In Master List = 
    VAR vCustProd = 'Sales and Order Entry'[Customer and Product]
    VAR vTable =
        FILTER ( 'Master List', 'Master List'[Customer and Product] = vCustProd )
    VAR vResult =
        IF ( ISEMPTY ( vTable ), "N", "Y" )
    RETURN
        vResult

     

     

2 Replies

  • awolf88,

     

    Try this calculated column in the Sales and Order Entry table:

     

    In Master List = 
    VAR vCustProd = 'Sales and Order Entry'[Customer and Product]
    VAR vTable =
        FILTER ( 'Master List', 'Master List'[Customer and Product] = vCustProd )
    VAR vResult =
        IF ( ISEMPTY ( vTable ), "N", "Y" )
    RETURN
        vResult

     

     

  • Thank you so so much for that coding, DataInsights . Did the job beautifully!

     

    Much appreciated!

    Best regards,

    Alex