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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Hnd12000
Frequent Visitor

Composing text with null values replaced by nothing

I'm trying to compose a text (to define the location of a file) that is made of the combination of Drilled down values (concatenated with "&")

The problem I face is that there are instances when some of this Drill down can be empty.

In Excel concatenating cells that are empty will not add anything but in PowerQuery empty is null and this ruin my formula

Are there any ways to replace this "null" by nothing in my formula ?

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

Text.Combine function can ignore the null value in its first parameter.

View solution in original post

4 REPLIES 4
sandermatthijs
Advocate I
Advocate I

Maybe the solution by @CNENFRNL is more elegant, easier to use in case you have more columns (like I had)?

Table.AddColumn(#"Replaced Value", "Custom", each ([A]??"") & ([B]??"") & ([C]??""))

Solved: Custom column to combine two Colum returns null if... - Microsoft Fabric Community

Anonymous
Not applicable

Hey there. You can do this:

NewStep = Table.AddColumn(PriorStepName, "NewColumnName", each if [Column2] = null then [Column1] else [Column1]&[Column2], type text)

 

---Nate

Fowmy
Super User
Super User

@Hnd12000 


You may try to replace null with blank using:

Fowmy_0-1604175027054.png

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

wdx223_Daniel
Super User
Super User

Text.Combine function can ignore the null value in its first parameter.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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