【问题标题】:Expression.Error: We cannot apply operator < to types Function and NumberExpression.Error:我们不能将运算符 < 应用于类型 Function 和 Number
【发布时间】:2020-04-28 19:04:26
【问题描述】:

错误是:

Expression.Error:我们不能将运算符

错误给出的代码:

#"Added Conditional Column4" = Table.AddColumn(#"Added Custom9", "Custom", List.Max( { 16500, each if [Gross Remuneration] > 200000 then 

     Number.From(if  [Gross Remuneration]*0.125 > 40000 then 40000 else [Gross Remuneration]*0.125) +  Number.From( if  [Gross Remuneration]*0.025 > 5000 then 5000 else [Gross Remuneration]*0.025 )

     else 

     Number.From(if [Gross Remuneration]*0.125 > 20000 then 20000 else [Gross Remuneration]*0.125) +  Number.From(if  [Gross Remuneration]*0.025 > 5000 then 5000 else [Gross Remuneration]*0.025)

     })


    )

我在each if 前面尝试了Number.From,但没有帮助我找到 16,500 和 if 子句后计算的数字之间的最大数字。

感谢您的帮助。

【问题讨论】:

  • 我使用了两列作为解决方法...第一列用于 acf if 部分,第二列用于最大值...
  • 你的数据是什么样的?

标签: excel powerquery


【解决方案1】:

您应该将每个关键字移到 List.Max 前面。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多