Pivot table sum value issue

leojez

Board Regular
Joined
Apr 12, 2022
Messages
51
Office Version
  1. 365
Platform
  1. Windows
Hello,

In my source data table in cell AE9, I have the following formula:
VBA Code:
=IF(AD9<>"",IFERROR((J9-AD9)*K9*100,""),"")

This returns any error as a blank and also returns a blank if cell AD9 is blank (I know complicated! But it works well in that table.)

The issue is, when inserting pivot tables I can't get this to show as a sum value ... I get the following error when tying to change to "Sum" in the Value Settings:
"We cannot summarize this field with Sum because it's not a supported calculation for Text data types."

I've tried changing the last "" in the formula to a "0" but this results in the same error.

Any ideas how to fix? Many thanks in advance!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I am pretty sure you are using Power Pivot and it is pulling data from the data model.
Are you also using Power Query ?
Either in Power Pivot > Manage. Highlight the value column and make sure the data type is a numeric data type. OR go into the underlying Power Query and do it there.

1650440415909.png
 
Upvote 0
I am pretty sure you are using Power Pivot and it is pulling data from the data model.
Are you also using Power Query ?
Either in Power Pivot > Manage. Highlight the value column and make sure the data type is a numeric data type. OR go into the underlying Power Query and do it there.

View attachment 62821
Thanks for your reply!

I don't have Power Pivot activated and I've also never used Power Query. I forgot to mention though that when I inserting the pivot table, I did so by adding the data to a data model (so I can get some text fields to display as text). I can now see that this is causing the issue - I've created another pivot without data model this and the formula is returned correctly. However, is there any way I can get the issue resolved in my data model pivot table?

Thanks!
 
Upvote 0
Return 0 not "0" so that it is a number not text. Or use a calculated column in the data model table so that you can return BLANK()
 
Upvote 0
Solution

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top