powerbidaxpowerbi-desktopmpower-bi-report-server

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


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


Solution

  • 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()
    )