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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
quibtisa
New Member

Error in merging two tables

I am having trouble merging two tables in Power Query. I have one table called "Orders" with columns "OrderID", "CustomerID", and "TotalPrice", and another table called "Customers" with columns "CustomerID", "FirstName", and "LastName". I want to merge these two tables on the "CustomerID" column, but I am unsure of how to do this.

Here is the code I have tried:

let
    Source = Table.NestedJoin(Orders,{"CustomerID"},Customers,{"CustomerID"},"NewColumn",JoinKind.Inner),
    #"Expanded NewColumn" = Table.ExpandTableColumn(Source, "NewColumn", {"FirstName", "LastName"}, {"FirstName", "LastName"})
in
    #"Expanded NewColumn"

This code returns an error message saying "The column 'CustomerID' of the table wasn't found." Can someone help me?

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @quibtisa ,

 

Check the column name is the same and check if it differs in which if there's a capital letter or a small letter because it matters.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

1 REPLY 1
Idrissshatila
Super User
Super User

Hello @quibtisa ,

 

Check the column name is the same and check if it differs in which if there's a capital letter or a small letter because it matters.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors