Tableau 拆分字符串并从 x 令牌中取出直到令牌结束 [英] Tableau split string and take from x token until the end of tokens

查看:26
本文介绍了Tableau 拆分字符串并从 x 令牌中取出直到令牌结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字符串字段,想要获取从位置 x 到结尾的所有元素".

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:

  • /一/二
  • /三/三/四
  • /五/六

因此我想要:

  • 两个
  • 三/四
  • 六个

我尝试使用 SPLIT([Field Name], '/', 2) 但随后缺少four".有没有办法从令牌 2 一直到令牌结束?

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?

推荐答案

这应该有效:

RIGHT([Field Name],LEN([Field Name]) - FINDNTH([Field Name],"/",2))

这将返回字符串 [Field Name] 的右侧部分并指定保留最后 n 个字符,其中 n = 原始字符串的长度减去第二个/"的位置.

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 "/".

这篇关于Tableau 拆分字符串并从 x 令牌中取出直到令牌结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆