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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

Hi @Anonymous ,

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.

 

Anonymous
Not applicable

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?

Anonymous
Not applicable

can you help me with the dax? 

Hi @Anonymous 
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 @Anonymous 
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-relationship/

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors