Forum Discussion
Marcy123
Sep 22, 2025Copper Contributor
SUMIF help
Trying to create a total based on 2 pivot tables. What formula do I put in the column in red text. PIVOT #1 ITEM SUM APPLES 5.2 PEARS 3.2 CHERRY 0.4 TOAST 0.2 ORANGE 1....
PeterBartholomew1
Sep 28, 2025Silver Contributor
To pick up from mathetes​ post, it is probably easiest not to use a Pivot Table in the first place. If that is what you have you will need a list of distinct items then use GETPIVOTDATA to extract values from each.
distinctItems
= SORT(UNIQUE(VSTACK(Table1[Item], Table2[Item])))
= IFERROR(GETPIVOTDATA("Amount", pivotTable1,"Item", distinctItems), 0)
+ IFERROR(GETPIVOTDATA("Amount", pivotTable2,"Item", distinctItems), 0)
If, on the other hand, you have access to the source data then you could stack the data first then pivot it
= LET(
stackedItems, VSTACK(Table1[Item], Table2[Item]),
stackedAmount, VSTACK(Table1[Amount], Table2[Amount]),
GROUPBY(stackedItems, stackedAmount, SUM)
)