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! Request now

Reply
trevb
Advocate II
Advocate II

How to join a string to a column value in PowerQuery

Okay,

 

So I have a column that has a null value in some cells.  In another column though the second half of the data is present but missing the prefix.

 

Core Column                  Other column

ITxxxxxx                          xxxxxx

 

I want to replace any null values in the core column with "IT" & [Other column].  So far though I'm just not quite getting it.  I can get the [Other column] in place using 

 

each _[Other column]

 

because this is a function though it resists joining with the string.  I've tried using Text.Combine with a list and other things but still have not worked my way to fixing this.  I am sure when someone explains I'm going to feel pretty stupid but the deadline I have is closer than my ability to read through the book I bought.

 

Can anyone point me in the right direction?

 

 

 

1 ACCEPTED SOLUTION
mike_honey
Memorable Member
Memorable Member

I think the expression you need is:

 

each "IT" & [Other column]

 

 

The "&" character does string concatenation.

 

The whole Step would be something like:

 

= Table.ReplaceValue(#"Changed Type",null,each "IT" & [Other column],Replacer.ReplaceValue,{"Core Column"})

View solution in original post

6 REPLIES 6
mike_honey
Memorable Member
Memorable Member

I think the expression you need is:

 

each "IT" & [Other column]

 

 

The "&" character does string concatenation.

 

The whole Step would be something like:

 

= Table.ReplaceValue(#"Changed Type",null,each "IT" & [Other column],Replacer.ReplaceValue,{"Core Column"})

l said I'd feel stupid didn't l?  Can't believe I didn't think to try that combination.  I Cleary don't have a grasp on what each does yet.

 

Many thanks for the help

 

@trevb - I wouldnt beat yourself up too much. It is a fairly new technology/language without a lot of doco and examples.

@mike_honey You're helping me all over the place mike.... however, any reason all of my elements data types were lost after this method of value replacing? I only had 1 intended column in the formula....

 

= Table.ReplaceValue(#"Added Custom", each ", " & [DocumentIDValue],"",Replacer.ReplaceValue,{"UORC Link"__li__ng_escape____li__ng_escape__})

 PS no idea what "_li__ng_escape____li__ng_escape__" is at the end of my formula when posting here, that is not acutally in PowerBi.

No I havent seen it do that. 

GTR
Helper III
Helper III

I don't have a PC in front of me to test but I'm pretty sure you can do this in PowerQuery using the TRIM button and/or parse. I can test later but it might lead you in the right direction. Split Column button might also help with this. 

 

Hope this helps

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
Top Kudoed Authors