Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
daydream1989
Helper I
Helper I

How to lookup to another table? Vendor list and open invoices

I have a list (List 1) with all the open invoices from all vendors. And I have another list (List 2) of critical vendor list. How do I create a new column in the 1st list that if the vendor code in list 2 is the same as vendor code in list 1, it will show 'Yes', and if there is no vendor code in list 2 to match with list 1, it will show 'No'?

5 REPLIES 5
v-zhouwen-msft
Community Support
Community Support

Hi @daydream1989 ,

Table data and model views are as follows:

vzhouwenmsft_0-1706581569733.pngvzhouwenmsft_1-1706581611228.pngvzhouwenmsft_2-1706581630679.png

 

Please follow these steps:
1. Use the following DAX expression to create a calculated column .

Column = IF
(
    (RELATED(Tabelle2[Vendor]) = [Vendor]),
    "YES","NO"
)

vzhouwenmsft_3-1706581764464.png

2. Final output

vzhouwenmsft_4-1706581913905.png

vzhouwenmsft_5-1706582238640.png


Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Wen Bin,

 

I have another rule need to add in the DAX because in my table 2 with critical vendors, there are company code and vendor code. If i match only vendor code to my table 1 with open invoices, it will clash with other company code that has same vendor code. Can you help me?

daydream1989
Helper I
Helper I

can you help me with the dax? 

Hi @daydream1989 
I attached a link with a tutorial in the previous response.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @daydream1989 
There are a few methods to get the desired result.

1 . With Power Query :

https://smantindata.com/value-exists-in-another-column-power-query/

2. With dax

https://powerbidocs.com/2020/08/17/how-to-check-table-1-value-exist-or-not-in-table-2-without-any-re...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.