tableau-api - 为 tableau 中的多个 if 语句获取正确的计算
问题描述
我正在尝试在画面上写一个 if then 语句,但我可能会遗漏一些东西,这是一个多重比较我现在拥有的东西 If {Receive Campus match } = false then '0' Else If { matches lag} = true then true else false否则,如果 { 计划货物与发货之间的天数差异} < = 0 那么 { 固定.......} 有一个 LOD ELSE '0' End End End 但它不正确!将需要帮助
解决方案
由于您尚未上传任何数据/屏幕截图,因此很难理解您的问题,但我可以在您提出的计算中看到一些错误。
你提出的计算,如果分成短语,就会变成这样——
line-1 If {Receive campus match } = false
line-2 then ‘0’
line-3 Else If { matches lag} = true
line-4 then true
line-5 else false
line-6 Else If { days difference between goods planned vs shipped} < = 0
line-7 Then { fixed .......} there’s an LOD
line-8 ELSE ‘0’
line-9 End End End
问题 1:在画面中有ELSEIF
和没有ELSE IF
问题 2:一旦提供了(第 5 行),您就不能开始新的else if
(原文如此!)(第 6行)else
问题 3:为什么END
在第 9 行有 3 个?
基本上 IF THEN ELSE IF ELSE END 的语法是这样的......
IF <Condition>
Then <Result 1>
ELSEIF <condition 2>
then <Result>
... Repeat ELSEIF and THEN here, if you have several conditions
ELSE <last result corresponding to last false condition>
END
推荐阅读
- laravel - 求和方法 laravel
- python-3.x - 如何将滚动文本向右对齐?
- node.js - 如何在 DDEV 中使用 Django/Nodejs
- docker - 为浮动许可服务器创建 RMI 服务失败 | Docker ReadyAPI
- c# - BoxCollider2D 和 Pivot 的问题
- python - 如何使 abs() , sqrt() (来自 sympy)与值进行比较?
- c# - 单元测试,DbContext 模拟异步抛出 InvalidOperationException:源 IQueryable 未实现 IDbAsyncEnumerable
- ios - 如果 JSON 有破折号 (-),则 Swift 解码错误:Swift.DecodingError.keyNotFound
- javascript - 在另一个 JS 文件中使用 JS 函数
- sql - 如何在 OPENROW SET 中添加动态 URL