【问题标题】:Token literal in Powerquery M formulaPowerquery M 公式中的标记文字
【发布时间】:2021-12-10 09:24:56
【问题描述】:

我在以下 powerquery M 公式中收到 Token Literal 预期错误。错误指向**之间的部分

if 
(if [Value 1] = true then [Value 2] - [Value 3] else [Value 3] - [Value 4]) < [Value 1] and 
**if** 
(if [Value 1] = true then [Value 2] - [Value 3] else [Value 3] - [Value 4]) > 0 then 1 else 

Please note this is this a part of a bigger formula, but only this part gives an error. 

Does anyone has an idea how to solve this? 

【问题讨论】:

    标签: powerquery m


    【解决方案1】:

    如果没有公式在最后一个 else 之后结束(我假设为 0)就很难说,但是删除额外的 IF 应该可以工作

    如果

    (如果 [值 1] = true 则 [值 2] - [值 3] 否则 [值 3] - [值 4])

    (如果 [值 1] = true 则 [值 2] - [值 3] 否则 [值 3] - [值 4])> 0

    然后 1 否则 0

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-28
      • 2021-06-29
      • 1970-01-01
      • 1970-01-01
      • 2015-03-04
      相关资源
      最近更新 更多