PDA

View Full Version : Sleeper: Power Query - Replace multiple values



joshua1990
05-08-2018, 02:45 AM
Good day!


How can I replace multiple values with a value in PowerQuery (advanced editor) at once?
So X = 1, Y = 1, A = 1 etc.


The actual function looks like this:

= Table.ReplaceValue (# "Changed Type", "X", "1", Replacer.ReplaceText, {"Value"})


Best regards!

fb7894
08-13-2018, 02:08 PM
What if you add a new helper column and use and IF statment?



#"Added Conditional Column" = Table.AddColumn(PreviousStep, "Custom", each if [Column6] <> null then 1 else null)