如何修复多列无法转换为标量值问题

huangapple go评论83阅读模式
英文:

how to fix Multiple columns cannot be converted to a scalar value

问题

我想创建一个度量,将一个字母与包含数字值的列连接起来

这是公式

度量 = IF(
    FILTER('表',[D/C] = "C"),
    MAX('表'[金额]),
    BLANK()
)

它返回这个错误:"该表达式引用了多个列。无法将多个列转换为标量值。"

请帮助我。

英文:

I want to create a measure that concatenates a letter with a column that contains numeric values

here is the formula

measure = IF(
    FILTER('table',[D/C] = "C"),
    MAX('table'[Montant]),
    BLANK()
)

It returns this error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

help me please

答案1

得分: 1

转到Power Query并将列Montant的类型转换为文本,然后尝试以下度量:

measure = IF(
    SELECTEDVALUE('table'[D/C]) = "C",
    "C - " & SELECTEDVALUE('table'[Montant]),
    BLANK()
)
英文:

Go to Power Query and convert column Montant type to Text then try following measure

measure = IF(
    SELECTEDVALUE('table'[D/C]) = "C",
    "C - " & SELECTEDVALUE('table'[Montant]),
    BLANK()
)

huangapple
  • 本文由 发表于 2023年7月27日 19:24:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76779251.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定