Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

LOOKUPVALUE Question

  Hello,   The below code looks for an ID from Table1, in Table2. If it finds a matching ID, it returns a value for the ID from Table2 that I'm using in a line graph.   What I want to do is have...
  • v-easonf-msft's avatar
    6 years ago

    Hi , Anonymous 

    I don’t know if I understand you correctly. I made a demo, I hope it will be helpful to you.

    I create  a calculated table by using two tables:

    Table1+2 = DISTINCT(UNION(SELECTCOLUMNS(Table1,"ID",Table1[_ID]),SELECTCOLUMNS(Table2,"ID",Table2[_ID])))

    Then add two  calculated column into the table:

    Table 2 - value = IF(ISBLANK(RELATED(Table2[Table2  Value])),0,RELATED(Table2[Table2  Value]))
    Table 2 - value = IF(ISBLANK(RELATED(Table2[Table2  Value])),0,RELATED(Table2[Table2  Value]))

    it shows as below:

     

    Pbix attach 

     

    Best Regards,
    Community Support Team _ Eason