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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.