Forum Discussion

Bakels1904's avatar
Bakels1904
New Member
4 years ago
Solved

calculate error

 

what is the wrong in the below calculation?

 

Thanksin advance 

 

  • Hi Bakels1904 ,

     

    It is strange to write a DAX like you provided. Please refer this guide of  CALCULATE.

    Syntax:

    CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])

     

    The first parameter is used to be aggregation functions like sum(), max(). the result of this normally is one value. 

    The second parameter is used to some filtered tables which result is table.

    However, the result of FILTER(ItemCostPrice,max(ItemCostPrice[ToDate])-1), in your case, is table. I do not understand what you want to calculate but i think you can change CALCULATE() to CALCULATETABLE()

     

    Or you can refer this article for more details.

    https://www.sqlgene.com/2019/04/30/dax-error-the-expression-refers-to-multiple-columns-multiple-columns-cannot-be-converted-to-a-scalar-value/ 

     

    If you need more help please share sample data and expect result.

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies