问题
I have a field of strings and want to take all the "Elements from position x until the end.
For example there is a "Field Name" column with the following values:
- /one/two
- /three/three/four
- /five/six
As result I would like to have:
- two
- three/four
- six
I tried with SPLIT([Field Name], '/', 2)
but then the "four" is missing. Is there a way to talk from token 2 until the end of tokens?
回答1:
This should work:
RIGHT([Field Name],LEN([Field Name]) - FINDNTH([Field Name],"/",2))
This is returning the right part of the string [Field Name] and specifying to keep the last n characters, where n = length of the original string minus the location of the second "/".
来源:https://stackoverflow.com/questions/49922554/tableau-split-string-and-take-from-x-token-until-the-end-of-tokens