Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Trim error

knozawa
11 - Bolide

My data was not trimmed appropriately.

 

Formula: trimleft([JSON_Name],"data.")

 

Result:

Before TrimAfter Trim

data.term

erm
data.thankhank
data.therapiesherapies
data.workwork
data.worldworld
data.womenwomen

 

Does anyone know how to fix this?

 

Thank you,

Kazumi

2 REPLIES 2
RodL
Alteryx Alumni (Retired)

Per Help on Functions, TrimLeft will remove any characters specified in "y", from "x".

 

TRIMLEFT(x, y) Remove character in the string y from the beginning of the string x.

 

Since "t" is in your "y" set of data, it is trimming the "t" after the period as well.

 

Based on your small sample set of data, I would suggest

--REPLACING "data." with "" (in other words, replace "data." with an empty value)

--or using RegEx to keep anything after the period

--or a SUBSTRING function that starts at the 6th character

 

Depending on what your full set of data looks like, one of these should work.

knozawa
11 - Bolide

Thank you!

Labels