Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not 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"

2 ACCEPTED SOLUTIONS

Then you want to swap SUM for COUNT.

View solution in original post

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,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

6 REPLIES 6
lbendlin
Super User
Super User

Correct.  You can't really add up customer names.  What were you trying to achieve?

Anonymous
Not 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.

Then you want to swap SUM for COUNT.

Anonymous
Not applicable

Thanks. I forgot.

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,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.