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! Learn more

Reply
captainlaw
Microsoft Employee
Microsoft Employee

Merge Issue | Replace NULL

Hello Power BI Community,

 

I'm trying to merge two table in Power BI queries, and I used full-outer join.  As you can from the result screenshot below, It didn't quite merge the two, so I tried to add a Custom Column trying to replace null values from the other column.  Below is the syntax I used - Text.Replace([State],null,[State.1])

 

I'm receiving error that null cannot be convert to text. 

I'm wondering how best to merge the two or what syntax I should use to replace all null? 

 

 

Appreciate your help.

 

powerbi-merge.JPG

1 ACCEPTED SOLUTION

It wasn't an issue with Cap Letters nor JOIN nor Merge.  When I simply Merge again with FULL JOIN, it finally worked.  I am also able to create a DimState from the merged table with combination of IF and Table.Distinct() 

Issue resolved.  Thank you all.

View solution in original post

4 REPLIES 4
v-caliao-msft
Microsoft Employee
Microsoft Employee

Hi @captainlaw,

 

In Power BI Desktop, there are multiple options available when using Merge Query feature.

 

To remove the null value, you can use inner join instead.

Capture.PNG

 

Reference
https://businessintelligist.com/2015/09/15/power-bi-desktop-merge-query-options/

 

Regards,

Charlie Liao

It wasn't an issue with Cap Letters nor JOIN nor Merge.  When I simply Merge again with FULL JOIN, it finally worked.  I am also able to create a DimState from the merged table with combination of IF and Table.Distinct() 

Issue resolved.  Thank you all.

CahabaData
Memorable Member
Memorable Member

I would suggest if the record set model is a reasonable record count and not gigantor: Append (not merge) 1 column to the other for a single long column.  Then create a column using DISTINCT or VALUEs so to eliminate all duplicates.

 

 

www.CahabaData.com
kcantor
Community Champion
Community Champion

You aren't getting a clean merge because your data is not an exact match. Some are in All Caps. Clean the data and transform to make them match, then Merge again. You can also replace the null before creating a new column. Replace null, for example, with 1 the use that in your column instead of null.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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