Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculatetable showing the expression refers to multiple columns. Cannot be converted to scalar valu

 

  • Hi Anonymous 

     

    It seems you are creating a measure. For a measure, it should always return a scalar value rather than a table. You should use CALCULATE rather than CALCULATETABLE.

     

    Try a measure like

    sales = CALCULATE ( SUM ( 'Sales'[sales] ), 'Sales'[Location] = "Bangalore" )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

1 Reply

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

     

    It seems you are creating a measure. For a measure, it should always return a scalar value rather than a table. You should use CALCULATE rather than CALCULATETABLE.

     

    Try a measure like

    sales = CALCULATE ( SUM ( 'Sales'[sales] ), 'Sales'[Location] = "Bangalore" )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!