Forum Discussion

Ignacioo's avatar
Ignacioo
New Member
1 year ago

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

Mi intención es poder filtrar los años de ingreso de 5 alumnos, donde yo selecciono 2021 con el fin de que se queden los alumnos que tengan ese mismo año osea 3 alumnos y los demás sean filtrados.
He batallado muchos días con este problema, agradecería mucho saber en qué fallo!

2 Replies

  • First to check is this a measure or New table.

    If measure you can't return FILTER as that is a table, use New table.

     

    If _Anio holds 3 students you can't use SelectedValue instead use Values() as that can return a column of values.

    With values you need CalculateTable instead of Calculate and IN instead of =.

     

    table =

    var _anio = CalculateTable( Values('table'[anio_ingresso), Keepfilter(table))

    Return

    Filter(
    all(Table)

    ,table[column] IN _Anio
    )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ignacioo ,

     

    If you could provide some simulated data and the expected output, that would be very helpful.
    How to Get Your Question Answered Quickly
    How to provide sample data in the Power BI Forum

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum