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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Replacing string with null in power query

Hey there

 

I'm trying to replace a text string in power query with power query's standard null value. However, whatever the text I try to replace with the null all I get is the same value all over (as show in the following image).

pedrohp503_0-1650489077092.png

Why I do not simply replace it with ""? Because when I do so, I get two kind of blank values in my dataset:

pedrohp503_1-1650489321144.png

I've came across with this post, but it does not fix my problem because I have to replace several values at once.

 

Do someone knows how to do that replacement?

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

The second part you mentioned is not empty. This means that you have at least one space character in your text.

1.png

If possible, you should first replace ' ' with '' as follows:

 

= Table.ReplaceValue(#"Renamed Columns"," ","",Replacer.ReplaceText,{"Column3"})

 

3.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

The second part you mentioned is not empty. This means that you have at least one space character in your text.

1.png

If possible, you should first replace ' ' with '' as follows:

 

= Table.ReplaceValue(#"Renamed Columns"," ","",Replacer.ReplaceText,{"Column3"})

 

3.png

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Anonymous , null will be shown as blank in DAX. Sorry, but bot sure what is the issue here?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.