Forum Discussion
mechanix85
9 years agoHelper I
Table.TransformColumns by criteria
Hello! How can I convert a column by a condition? Something like this if type = №2 and type2 = true then List.Product({_, -1}) else List.Product({_, 1}) ???
- 9 years ago
Hi mechanix85,
You could try this. It worked in my test.
#"Replaced Value" = Table.ReplaceValue(#"Changed Type1", each [value], each if [type] = "No2" and [type2] = true then [value] * -1 else [value] * 1, Replacer.ReplaceValue,{"value"}),Best Regards!
Dale
Anonymous
4 years agoNot applicable
Hi,
Dale's solution does work for me. However I was wondering if there is a way to transform multiple columns in one step? Right now I have to repeat on every column I wish to transform.
Thanks.
Carl