Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace text with null in powerquery?

I would like to replace "ValueToReplace" with null in powerquery. This does not work (returns error):

Table.ReplaceValue(#"Previous Step","ValueToReplace", null ,Replacer.ReplaceText,{"Col1"})

This works but it returns "" instead of null:

Table.ReplaceValue(#"Previous Step","ValueToReplace","",Replacer.ReplaceText,{"Col1"})
like image 951
Przemyslaw Remin Avatar asked Feb 23 '26 08:02

Przemyslaw Remin


1 Answers

I think it's because null isn't a text value, so you need to use ReplaceValue instead of ReplaceText.

Table.ReplaceValue(#"Previous Step","ValueToReplace",null,Replacer.ReplaceValue,{"Col1"})
like image 104
Alexis Olson Avatar answered Feb 26 '26 13:02

Alexis Olson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!