Forum Discussion
PowerAppsUser
4 years agoFrequent Visitor
Replace Values not working
Hi, I am trying to replace the value of a cell with another value in Power Query by right clicking that cell and using 'Replace Value', but it doesnt seem to work. I want to change "null" to "Electr...
- 4 years ago
Ah, it sounds like you had the text "null" rather than actual nulls. I didn't pick that up upon the first read.
In that case, you can skip the uppercase transformation and just use "null" instead of null in your original M code (insert the quotes into the formula):
= Table.ReplaceValue(#"Trimmed Text","null","Electricity",Replacer.ReplaceValue,{"Sector"})
AlexisOlson
4 years agoSuper User
It might be an empty string "" instead of a null. See if this works:
= Table.ReplaceValue(#"Trimmed Text","","Electricity",Replacer.ReplaceValue,{"Sector"})
Or as Samarth_18 suggests, it might be a space or some other type of whitespace.