Forum Discussion

harirao's avatar
harirao
Post Prodigy
5 years ago

Lookup between two tables

Hi Team,

 

Can you please assist me on below, as i want to do lookup in table SFDC_Open_data column Open_data from table SFDC_NoQuote_data column No Quotes. 

 below example from Excel, same need to be implemented in PBI
=IFERROR(VLOOKUP(A2,'No Quote'!A:A, 1, 0), "No Match")

 

Thank you

 

Regards,

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello harirao ,

     

    you can either work this through the merge function in power query and then add a custom column as: 
    if [vlookupedcolumn] = null then "No Match" else [vlookupedcolumn] or use the "lookupvalue" function in DAX (lookupvalue(NoQuotes, lookupvalue in noquotes, lookup value in Open_Data) and eventually mix it with an "If" so that:
    If(lookupvalue[.....] = "", "No Match", lookupvalue[...])

    One more note, if you opt for the merge in power query you gotta be careful to duplicates in the 2nd table you're merging or it might extend your main table for each occurrence of the selected value.

    Hope this helps.