如何在powerquery中用null替换文本?

Prz*_*min 0 m powerquery powerbi

我想用 powerquery 替换“ValueToReplace” null。这不起作用(返回错误):

Table.ReplaceValue(#"Previous Step","ValueToReplace", null ,Replacer.ReplaceText,{"Col1"})
Run Code Online (Sandbox Code Playgroud)

这有效,但它返回 "" 而不是 null:

Table.ReplaceValue(#"Previous Step","ValueToReplace","",Replacer.ReplaceText,{"Col1"})
Run Code Online (Sandbox Code Playgroud)

Ale*_*son 6

我认为这是因为null不是文本值,所以你需要使用ReplaceValue而不是ReplaceText.

Table.ReplaceValue(#"Previous Step","ValueToReplace",null,Replacer.ReplaceValue,{"Col1"})
Run Code Online (Sandbox Code Playgroud)