Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Filter questions

I have a master data set that gives multiple items and locations. I have a second data set called "other" that list one item and location. I need to knw how to use the "other" table to mark those location and item onthe Master sheet. Hope I am explaining this right

 

Master                                             Other                                         Need to mark/notate all the line items in Other on Master

item 1, location 1                            Item 1, location 1

item 1, location2                             Item 1, location 2

item 1, location 3                           item 1, location 5

item 1, location 4

item 1, location 5

item 1, location 6

item 2, location 1

item 2, location 2

item 2, location 3

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

    Search existing values from table1 in table2.

    This will count rows and return 1 if the value exist or null if not exist.
    You can play with the values and marking.

     

    MarkExist = CALCULATE(COUNTROWS(Master),
    FILTER(Master,Master[Column1] = EARLIER(Other[Column1])),
    FILTER(Master,Master[Column2] = EARLIER(Other[Column2])))
     
  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous ,

     

    If you'd like to add a new column, please try this one.

     

    Column =
    LOOKUPVALUE ( Other[Column], Other[Column], Master[Column] )
    

     

     

    Best Regards,

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous ,

     

    Could you please mark the proper answers as solutions?

     

     

    Best Regards,