Forum

Notifications
Clear all

SUMIFS in Pivot Tables

5 Posts
3 Users
0 Reactions
1,297 Views
(@paul_f)
Posts: 81
Estimable Member
Topic starter
 

Hello,

I usually use SUMIFS with Excel tables because of the dynamic headers feature. If I move or insert columns in the table, no problem. I've created a simple Pivot Table from an Excel table, attached. in cell L12, the SUMIFS formula references the Excel table; cell L13 references the Pivot Table. They both work, but if I should change the structure of the Pivot Table by adding or eliminating columns, the SUMIFS formula will still reference the same columns as before. In addition, a SUMIFS formula in a Pivot Table (or any non-table range) has to allow for the possibility of different size ranges if the Pivot Table expands, unlike with a table, which automatically adjusts. That might mean specifying the whole column just to avoid having to check the formula each time the data changes (side note: Do hundreds of thousands of blank rows slow the calculation down?).

Is there a better way?

Paul

 
Posted : 04/05/2019 12:33 am
(@fravis)
Posts: 337
Reputable Member
 

Hi Paul, did you try ´Getpivotdata´ to get the right information from the pivot table?

Frans

 
Posted : 04/05/2019 3:59 am
(@debaser)
Posts: 837
Member Moderator
 

For example:

=GETPIVOTDATA("Sum of Total APCs",Sheet1!$B$6,"Maps To","Other","APC Group",LEFT(K11,2)+0,"APC Group Name","Emergency Services","MonthYear",TEXT(L11,"myyyy"))

 
Posted : 04/05/2019 10:27 am
(@paul_f)
Posts: 81
Estimable Member
Topic starter
 

No, I didn't try GETPIVOTDATA because I think it is only a lookup for a single value, not a sum.

 
Posted : 04/05/2019 12:37 pm
(@paul_f)
Posts: 81
Estimable Member
Topic starter
 

Thanks, Velouria. I didn't see your post before replying, above. I didn't know the GETPIVOTDATA formula behaves similarly to SUMIFS. This makes it very flexible.

Thanks again, Paul

 
Posted : 04/05/2019 6:44 pm
Share: