Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

I have 2 tables connected to each other through col A. I want to match the column C with Col A and get the value of Col B.

For Example,

Table 1

ColA    ColB     Colc

a        a1       b

a        b1       c

c        c1       a

Table2

ColA ColB

a     a1

b     b1

c     c1 

Now, I have already created relationships between Table2 and Table1 for my other calculations connecting both the tables with the colA.

Now, I am trying to match ColC from Table1 with ColA of Table2 and return the value of ColB from Table2 as MatchedOutput.

Expected output Table1

 ColA    ColB     Colc     MatchedOutput

    a        a1       b     b1

    a        b1       c     c1

    c        c1       a     a1 

closed

1 Answer

0 votes
by (47.2k points)
selected by
 
Best answer
  • DAX function for this is LOOKUPVALUE.

  • Matched Output

LOOKUPVALUE(Table2[ColB],Table2[ColA],Table1[ColC])

  • This looks for the value in Table2[ColB] where Table2[ColA] matches Table1[ColC].

Browse Categories

...