Forum Discussion
Anonymous
6 years agoNot applicable
DAX error in PBI
Hi, I am getting an error with this DAX formula:
Number of NW Accounts = CALCULATE(SUM('Table1'[CustomerName]),'Table2'[Region]="Northwest")
The error msg is this:
"Calculation error in measure: The function SUM cannot work with values of type String"
Then you want to swap SUM for COUNT.
Hi Anonymous ,
You can also use "COUNTROWS",is your issue solved?If so,could you mark the reply as answered to close it?
Much appreciated.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
6 Replies
- lbendlin
Super User
Correct. You can't really add up customer names. What were you trying to achieve?
- AnonymousNot applicable
The number of customers. There is no customer id, so I thought to use the 'Name' field to count the number of customers. Thanks.
- lbendlin
Super User
Then you want to swap SUM for COUNT.