0
votes

I have a pivot table in google sheets. My data consists of rows where columns are "carton number", "product", "pallet number" (other, non-important, columns are omitted).

I want to generate a pivot table such that I get a summary of "what is on each pallet". Basically I've put into rows the "pallet number" and "product" and then into values "carton number". The value "carton number" is shown as "COUNT".

Of course, the problem is that this pivot table doesn't show the actual "carton number", it just shows "1" per each row, but the summary row of product/pallet shows the correct carton quantity.

Hence I had to put "carton number" also into "rows". Example sheet here:

https://docs.google.com/spreadsheets/d/1xpWYeG2aJCoqmnM53ubWUroKKJT5Zy-BiipauoXUHGw/edit#gid=799560604

What I want is to have a pivot table where, in the example above, there is only 1 value of "C. N." (carton number) - showing actual carton number; and the summary row at product/pallet level shows "COUNT" of the boxes, ie. how many boxes of product are on a specific pallet.

How can I achieve this?

1

1 Answers

0
votes

paste in E1 cell and hide C:D columns:

=ARRAYFORMULA({"C.N."; IF(C2:C<>"", C2:C, D2:D)})

0