CountryBoy_71
New Member
- Joined
- Nov 24, 2023
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
- MacOS
Good afternoon all,
Wondering if someone can help explain why this isn't working? The first example is based on another post here, the second is what I am attempting. For me, the "[ ]" resulted in a syntax error, while wrapping in the "{ }" provided valid code but doesn't actually do anything.
The column is a 'text' type and then converted to a 'int' in the next step.
I also realize that trying to make one step out of two may be a bit of a waste, but I also have another set of 4, replacing values that I am trying to clean up.
Wondering if someone can help explain why this isn't working? The first example is based on another post here, the second is what I am attempting. For me, the "[ ]" resulted in a syntax error, while wrapping in the "{ }" provided valid code but doesn't actually do anything.
Power Query:
= Table.ReplaceValue(#"Changed Type",each [Service Number], each if [Service Number] = " " then "" else if [Service Number] = "-" then "" else [Service Number],Replacer.ReplaceText,{"Service Number"})
Power Query:
= Table.ReplaceValue(#"Changed Type",each {"Service Number"}, each if {"Service Number"} = " " then "" else if {"Service Number"} = "-" then "" else {"Service Number"},Replacer.ReplaceText,{"Service Number"})
The column is a 'text' type and then converted to a 'int' in the next step.
I also realize that trying to make one step out of two may be a bit of a waste, but I also have another set of 4, replacing values that I am trying to clean up.