I have a pivot table that has 1 Row (ATIVO), 0 Column and 4 Values columns (Quantidade, Preço Un. Atual, Preço Médio and Total).

But I only need the grand total (shown as Total geral) from the last Total value column.

How can I remove the grand total (Total geral) from the others columns?

Similar editable sheet (only need the grand total of the last column): https://docs.google.com/spreadsheets/d/1tMAFh_RI5y6qkuC9ExgNW70Zh_htPqP9MgqxaMfD0ao/edit#gid=2100307022

The table is displayed as follows:pivot table

And it is set up like this:



1 Answer 1


You can create a copy of your pivot table where some values in the Grand Total row are replaced with blanks like this:

  data, G2:L9, 
  grandTotalLabel, "Grand Total", 
  includeInGrandTotal, "STOCK|POSITION", 
  labelCol, index(data, 0, 1), 
  labelRow, index(data, 1, 0), 
      labelCol <> grandTotalLabel, 
      if(regexmatch(labelRow, includeInGrandTotal), data, iferror(1/0)), 
      labelCol = grandTotalLabel 
  { table; totalsRow } 

To add another total to the Grand Total row, add its label in the includeInGrandTotal. See your sample spreadsheet.

See let(), filter(), regexmatch() and { array expressions }.

  • grand total celulas aren't editable
    – ethanxyz_0
    Mar 16, 2023 at 4:26
  • The pivot table in your sample spreadsheet seems to be missing a data source, making it difficult to edit. Edited the answer to add a formula based solution. Mar 16, 2023 at 9:31
  • wow. advanced one. thanks!
    – ethanxyz_0
    Mar 17, 2023 at 1:02
  • I don't know why, but just realized that the grand total sum is wrong
    – ethanxyz_0
    Mar 17, 2023 at 1:08
  • The grand total in the result is the same as in the pivot table you presented. Ask only one question per post. Post a new question instead. Mar 17, 2023 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.