【发布时间】:2020-05-22 23:59:48
【问题描述】:
Tableau 问题
我是 Tableau 的新手。我有一个字段名称 [Fruit description],我正在尝试使用关键字排除很多值。 例如,我要排除所有具有短语 [very red] 或 [juicy] 等的值。
我使用 IF Contains([field], [substring])=true 尝试了多种语法...我做错了..
这是我所做的:
If CONTAINS([fruit_description],"Very red")=true then "exclude"
ELSEIF [fruit_description], "juicy") =true then "exclude"
ELSEIF CONTAINS([fruit_description],"yummy")=true then "exclude"
ELSEIF CONTAINS([fruit_description],"very tasteful")=true then "exclude"
else "keep"
END
我也试过说 =true then 0 else 1 但这些都没有奏效。 我收到语法错误..
有什么帮助吗? :) 谢谢
【问题讨论】:
-
你能分享你看到的确切错误吗?另外,你能告诉我们
distinct(fruit_ description)吗?
标签: if-statement filter tableau-api contains