Hi Team,
I want to add single space to texts and not to numbers. I just need space to text fields.
Solved! Go to Solution.
Assuming you want to add a space after the text, this would work. Otherwise feel free to modify how you see fit:
IF isinteger([Root Cause])
then [Root Cause]
Else [Root Cause] + ' '
Endif
Hey @deepakpintya,
Assuming you want to add the text to the beginning you can use the regex match formula like this:
REGEX_Match([Root Cause], "\d+")
This will return True if only digits are present.
Put that in an if statement and you can add a space if it is not only numbers:
IF REGEX_Match([Root Cause], "\d+") THEN [Root Cause] ELSE " " + [Root Cause] ENDIF
The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...
If you want to learn more about Regex the community has some really quick interactive videos on getting to grips with it here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
Its not worked.
@deepakpintya did you want to add a space to the beginning or end?
Beginning.
@deepakpintya how did my example workflow not work for you?
unable to output but regex formula worked. In output its coming without space.
I have huge data with many coulmns, if i change to CSV from EXCEL then its not getting reconcile.