Forum Discussion

Medmbchr's avatar
Medmbchr
Icon for Helper IV rankHelper IV
3 years ago
Solved

VAR Table in RETURN statement

Hi I have created a variable in a DAX formula which returns a TABLE. However, when I try to return a value from a column in that table using SUM to sum all my columns, DAX doesn't recognize my table a...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Medmbchr ,

    Please try below steps:

    1. below is my test table

    Table:

     

    2. create measure with below dax formula

     

     

    Measure =
    VAR tmp =
        FILTER ( ALL ( 'Table' ), [Column2] < 50 )
    RETURN
        SUMX ( tmp, [Column2] )
    

     

     

    3. add a card visual with above measure

    Pleae refer attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.