1
votes

I have two tables where they are connected by Table1[ColA] &Table1[ColB].

Now I am trying to match the values from Table1[ColB] with Table2[ColB] & return the result in Table2[ColC]. Where the result should be -

if it matches "Found"
doesn't match "Not-Found"
else Empty

Table1

ColA    ColB   ColC 
11        AA
12        BB
13        

Table2

ColA    ColB
11        DD
12        CC
13        BB

Expected Output Table1

ColA    ColB   ColC 
11        AA   Not-Found
12        BB   Found
13        CC   Empty

Do anyone knows any solution to this problem!!

2

2 Answers

1
votes

I would do this with a calculated column like this in Table 1.

Col_C = 
         Var out1 = LOOKUPVALUE(Table2[ColB],Table2[ColB],Table1[ColB])
         Var out2 = IF(out1 = "", "Not Found","Found")
         Var out3 = if(Table1[ColB] = "", "Empty", out2)
return out3

The Key is to use Use the LOOKUPVALUE function to see, if the value exists.

enter image description here

Kindly accept the answer if it helps to solve your problem.

0
votes

Are this tables related? Then you could do the following column formula:

ColC = IF(ISBLANK(related(Table2[ColB]), "Not-Found", IF(Table1[ColB] = related(Table2[ColB]), "Found", "Empty"))