# PowerPivot SUM Error -- Calculation Aborted... cannot work with String.



## tml85 (May 2, 2016)

Hi all,

Apologize if this has been asked before... I did a bit of searching first.

On a single table, using a Pivot Table (with no slicers or filters yet) I am trying to display the Sum of a set of values and receive the following error when I change the "Summarize by" Value from the Count of to the Sum of:


ERROR - CALCULATION ABORTED: MdxScript(Sandbox) (7,  74) The function SUM takes an argument that evaluates to numbers or dates and  cannot work with values of type String.

<tbody>

</tbody>
How do I display the Sum of this field instead of the Count?

Example:

Category 1     100063
Category 2     11910
Category 3     49345

- With Category field placed in the Rows Label and the Cost field placed in Values.
- The data seems to be structured OK but I can't seem to resolve this via google searches.
- I realize this is quite basic stuff. I am comfortable with Pivot Tables and formulas in Excel but new to Power Pivot so if anyone could steer me in the right direction I would really appreciate it.
- I have solved the linking of tables but can't display the SUM instead of the Count (face palm).

Thanks


----------



## akice (May 2, 2016)

The problem is just what the error is saying; the Values column you are trying to Sum up are of Data Type "Text" in the model.  Power Pivot doesn't do automatic type conversion so you'll need to convert the column to a Number type manually either in Power Pivot or Power Query.


----------



## tml85 (May 4, 2016)

Goodness. It really was that simple. Thank you for the quick reply.. I really appreciate it.

I have the basics up and running. Time to crack open the books. Love this forum!


----------

