0

how can i set condition inside pivot sum data to refer label row ?
I need to sum data only if row label is equal to specific value.
I'm trying to use standard IF but it doesn't work.

Thanks.

enfix
  • 6,680
  • 12
  • 55
  • 80
  • Why don't you create a helper column at the original table with the `ROW()` function on it? So when you create your pivot table you can use their values as a filter option.. – dot.Py Mar 30 '17 at 14:12
  • I can do this, but I'm looking for a solution without to change source table. – enfix Mar 30 '17 at 14:16

2 Answers2

0

Use a vlookup ( within a vlookup.? Others please say if that is necc). copy paste your row tabels in another column in another sheet/tab and look for them im ur pivot.

Vlookup(a1,sheet2(column),1,0).

Altetnatively u culd just copy paste text only the pivot table results, and use ur if statement there.

But vlookups are superior if statements. So us that is more dynamic/poweful.

David Wooley - AST
  • 346
  • 2
  • 4
  • 13
0

I would use a sumproduct function if I were you.

https://www.ablebits.com/office-addins-blog/2016/08/24/excel-sumproduct-function-formula-examples/#Conditionally

To sum Apples sales for North: =SUMPRODUCT(--(A2:A12="north"), --(B2:B12="apples"), C2:C12)

enter image description here

ASH
  • 20,759
  • 19
  • 87
  • 200