I want to remove unwanted "," from the field Elimination reason. There are "," at the beginning and end and in middle. Can someone help me remove them and make the data clean?
Example
1 Due to Code Name , , , ,Not Enabled - In this text I just want 1 comma and the final text to look like "Due to Code Name , Not Enabled"
2 , , , ,Not Enabled - I want to remove unwanted commas in the beginning the final text should look like "Not Enabled"
3 ,Since it is a Parent , , , - I want to remove unwanted commas the final text should look like "Since it is a Parent"
4 Due to Code Name , , , , - I want to remove unwanted commas the final text should look like "Due to Code Name"
5
I want to remove unwanted "," from the field Elimination reason. There are "," at the beginning and end and in middle. Can someone help me remove them and make the data clean?
Example
1 Due to Code Name , , , ,Not Enabled - In this text I just want 1 comma and the final text to look like "Due to Code Name ,Not Enabled"
2 , , , ,Not Enabled - I want to remove unwanted commas in the beginning the final text should look like "Not Enabled"
3 ,Since it is a Parent , , , - I want to remove unwanted commas the final text should look like "Since it is a Parent"
4 Due to Code Name , , , , - I want to remove unwanted commas the final text should look like "Due to Code Name"
5 ,Since it is a Parent , ,Due to Ledger Name , - I want to remove unwanted commas the final text should look like "Since it is a Parent ,Due to Ledger Name"
6 Due to Code Name ,Since it is a Parent , ,Due to Ledger Name , - I want to remove unwanted commas the final text should look like "Due to Code Name ,Since it is a Parent ,Due to Ledger Name"
I'm attaching below my Alteryx workflow and Excel output file
Solved! Go to Solution.
Trim([field],",") will get rid of them at the beginning and end
Then you can use Regex_Replace after to replace multiple commas with one comma - something like RegEx_Replace([field],",+",",")
Tried doing your method but it didn't work
Pease show what you tried then, because it worked on my side!
It’s because you have leading spaces, so the comma is not the first character you need to trim
also, if there are spaces in between each of those commas, then you will need to clear those out A replace function to replace those instances of comma space with just a comma should do well
If you already did the transformation on the workflow I shared can you share the updated workflow? that would be much easier to follow. Thank you
Thank you for your help. I was able to achieve the desired result using your workflow. Thank you