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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
bharri
Frequent Visitor

Can't replace different null values in Power Query

I have a column that has blank cells, which register as null, and cells with the text string "null".

 

The standard course of action is to replace values with Value To Find = "null" and Replace With = "Unknown" (in my case). This replaces the null blanks, but not the cells containing the "null" text string. Right clicking on those cells and directly selecting replace values, prefilling the Value To Find with null, doesn't work either.

 

I've attached screenshots of what the cells look like before and after appling replace values. You can see (null) is gone, but the "null" string cells remain.

 

Any help would be greatly appreciated. Thank you.

 

BeforeBeforeAfterAfter

1 ACCEPTED SOLUTION
HotChilli
Community Champion
Community Champion

A little bit of experimentation should get you there.

I suggest adding the Replace Values for the null value ( using the interface) and then editing the M code in the formula bar or Advanced editor to be something like:

Table.ReplaceValue(#"Changed Type","null"......

View solution in original post

3 REPLIES 3
HotChilli
Community Champion
Community Champion

A little bit of experimentation should get you there.

I suggest adding the Replace Values for the null value ( using the interface) and then editing the M code in the formula bar or Advanced editor to be something like:

Table.ReplaceValue(#"Changed Type","null"......

Thank you HotChilli. Editing the M code from null to "null" did the trick!

Didn't even think of checking the advanced editor. You nailed it, needed to put quotes around null to distinguish it as a string as opposed to the usual null. Thank you!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.