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

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

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

问题

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

这是公式

  1. 度量 = IF(
  2. FILTER('表',[D/C] = "C"),
  3. MAX('表'[金额]),
  4. BLANK()
  5. )

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

请帮助我。

英文:

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

here is the formula

  1. measure = IF(
  2. FILTER('table',[D/C] = "C"),
  3. MAX('table'[Montant]),
  4. BLANK()
  5. )

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的类型转换为文本,然后尝试以下度量:

  1. measure = IF(
  2. SELECTEDVALUE('table'[D/C]) = "C",
  3. "C - " & SELECTEDVALUE('table'[Montant]),
  4. BLANK()
  5. )
英文:

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

  1. measure = IF(
  2. SELECTEDVALUE('table'[D/C]) = "C",
  3. "C - " & SELECTEDVALUE('table'[Montant]),
  4. BLANK()
  5. )

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:

确定