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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
khisla
Helper II
Helper II

X-Lookup two columns within difference tables and confirm match

Hello Power BI Helpers-

 

Need some help matching customer order from table 1 to customer returns from table 2.

Match needs to take into consideration the combination of two columns - Order # column and SKU # column.

Expected result is to mark in Table 1 would be shown in an additional column if the combination was found or was not found in Table #2  represented by a 1 or 0. 

 

Example

Table 1- Order Information

DateOrder IDProductSKU
January 1, 2025AL12345PensLXM_920
January 2, 2025AL56789PencilsUVX_556
January 10, 2025AL09876ErasersEDC_111
January 10, 2025AL09876ErasersEDC_113

 

Table 2 - Returns

 

DateOrder NumberProductItem ID
January 12, 2025AL12399PensLXM_920
January 22, 2025AL56789PencilsUVX_556
January 15, 2025AL09876ErasersEDC_113

 

Expceted Result

 

DateOrder IDProductSKUMatch
January 1, 2025AL12345PensLXM_9200
January 2, 2025AL56789PencilsUVX_5561
January 10, 2025AL09876ErasersEDC_1110
January 10, 2025AL09876ErasersEDC_1131

 

Thanks in advance.

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

The solution is very straightforward and also scalable if more columns should be incorporated.

ThxAlot_0-1740588723286.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

3 REPLIES 3
ThxAlot
Super User
Super User

The solution is very straightforward and also scalable if more columns should be incorporated.

ThxAlot_0-1740588723286.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



 

Thanks you so much!!

This worked perfectly.

Sahir_Maharaj
Super User
Super User

Hello @khisla,

 

Can you please try this approach:

Match = 
VAR Found = 
    LOOKUPVALUE(
        'Returns'[Item ID], 
        'Returns'[Order Number], 'Order Information'[Order ID], 
        'Returns'[Item ID], 'Order Information'[SKU]
    )
RETURN 
    IF(NOT(ISBLANK(Found)), 1, 0)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.