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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
LW_777
New Member

Merging Tables to Look-Up but Returning Null

Hi There,
I am using the merge query function to look-up values in another table (its product item numbers, therefore numbers and text) - trying to return the generic model numbers to help create a unique key between tables.  I have checked the data between the tables is in the same format (text) and there are no additional spaces/characters in either of the columns of data, yet Power Query is returning null.  Just doing a quick sample of the data in Excel and Excel returns true for an exact match.

Anyone have any other hints or ideas as to how I can resolve this please? 
My BI knowldge is exceptionally basic right now and trying to force myself to use BI given the size of data involved as I would always use Excel as standard.
Thank you.

LW_777_0-1674642006561.png

 

1 ACCEPTED SOLUTION
LW_777
New Member

Hi,

Thank you for your reply.

Both fields are upper text and numbers so it's not this causing the issue. 

In the end my manager my manager found the solution.  There was indeed spaces in one of the fields that didn't show when exporting to Excel or as text.  We performed the following steps to clean the data in order for the merge query to work:

Whilst in transform mode (Power Query),

Right click on the column to clean - select 'Replace Values'

LW_777_0-1674661185421.png

 

In 'Value To Find' put a single space (therefore cannot see it).

In 'Replace With', leave this blank / nothing

Click ok.

View solution in original post

3 REPLIES 3
LW_777
New Member

Hi,

Thank you for your reply.

Both fields are upper text and numbers so it's not this causing the issue. 

In the end my manager my manager found the solution.  There was indeed spaces in one of the fields that didn't show when exporting to Excel or as text.  We performed the following steps to clean the data in order for the merge query to work:

Whilst in transform mode (Power Query),

Right click on the column to clean - select 'Replace Values'

LW_777_0-1674661185421.png

 

In 'Value To Find' put a single space (therefore cannot see it).

In 'Replace With', leave this blank / nothing

Click ok.

BA_Pete
Super User
Super User

Hi @LW_777 ,

 

Have you also checked capitalisation? Power Query is entirely case-sensitive.

Try running Text.Upper on both [Item Number] and [ItemNum] before the merge.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you Pete, it wasn't case sensitivity as all the product IDs are upper case and numbers.
Thak you for replying though.  Appreciate your time.  My manager tried a solution that work per my reply posted.

Laura

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors