Forum Discussion
Text Combine Existing Column based on IF Statement from other columns
- 4 years ago
You are on the right track again! Replacer.ReplaceValue is the replacer function. The replacer function tells Power Query how to perform replacements. Replacer.ReplaceValue means replace the contents of the entire cell. To replace subtrings you would use Replacer.ReplaceText. If you'd like no action to be taken if the criteria is not satisfied then you would refer to the original text [Tags_Cloud].
So...
= Table.ReplaceValue(#"Added Custom", each [Tags_Cloud], each if [Tags_Cloud] <> null and [Manufacturer] = "Microsoft" then "Cloud " & [ProductClass__c] else [Tags_Cloud], Replacer.ReplaceValue, {"Tags_Cloud"})
Ah I think its the "Replacer.ReplaceValue" that is replacing everyhing in the field.
Maybe a Text.Combine instead?
As you can tell I am VERY new to Power Query.
You are on the right track again! Replacer.ReplaceValue is the replacer function. The replacer function tells Power Query how to perform replacements. Replacer.ReplaceValue means replace the contents of the entire cell. To replace subtrings you would use Replacer.ReplaceText. If you'd like no action to be taken if the criteria is not satisfied then you would refer to the original text [Tags_Cloud].
So...
= Table.ReplaceValue(#"Added Custom", each [Tags_Cloud], each if [Tags_Cloud] <> null and [Manufacturer] = "Microsoft" then "Cloud " & [ProductClass__c] else [Tags_Cloud], Replacer.ReplaceValue, {"Tags_Cloud"})- sscanlon4 years agoHelper II
Perfect, thank you again, just tested and working great, I really appreciate the fast replies and help!
- jennratten4 years agoSuper User
You are very welcome!