The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi there,
I have a text column with variations of a name which I need to replace.
I want to combine a ReplaceValue with Text.StartsWith and I can't figure it out.
The text in column [BRANCH] has variations of the word Axel such as 'Axel - UK' or 'Axel EUR' and I want it all to be renamed to the word 'Service' without having to replace values across all the variations individually.
I could do this is with a calculated column but I don't want a new column really.
I tried the below but it's wrong!
= Table.ReplaceValue(PreviousStep,each Text.StartsWith([BRANCH], "Axel", "Service",Replacer.ReplaceText,{"BRANCH"}))
Solved! Go to Solution.
Try
Table.ReplaceValue(PreviousStep,each [Branch],each if Text.StartsWith([Branch], "Axel") then "Service" else [Branch],Replacer.ReplaceText,{"Branch"})
Proud to be a Super User! | |
Try
Table.ReplaceValue(PreviousStep,each [Branch],each if Text.StartsWith([Branch], "Axel") then "Service" else [Branch],Replacer.ReplaceText,{"Branch"})
Proud to be a Super User! | |
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
48 | |
44 |