Forum Discussion
CALCULATE_SUM filter
Hello All,
I have error when i use Calculate , sum filter to get total Score by customer .
" The fucntion SUM cannot work with values of type String." error appear when i crate new columun with Dax formula
"TotalScore by Customer = CALCULATE(SUM(Score ), ALLEXCEPT (Cusotmer)))"
How should i fix errror ?
Thanks in advance for your help.
Regards,
SweZin
- Change it to Integer. SUM won't work on text data.
5 Replies
- AntrikshSharma
Community Champion
There are 2 errors here, first the data type of Score column is text, you can use power query for that or create a new calculated column using VALUE or do some maths operation on it like multiplyin the column by 1, second you haven't used ALLEXCEPT correctly you need to at least specify 1 column in ALLEXCEPT from which filters will not be removed, otherwise just use ALL ( Customer ).
- AnonymousNot applicable
Actually my dax formula as followed
TotalScore = CALCULATE(SUM(Table[Score],ALLEXCEPT(Table,Table[Customer]))
- AntrikshSharma
Community Champion
What is the data type of column Score?