Sum of a Column

Hi Knimers,

would like to seek help. How do you get the total of the column after using GroupBy Node?
Attached is a photo.

I wish to add a row with the Sum of the “Total” column.

1 Like

Total could be counted in Pivot node but in separate output. If you want it in one table use Concatenate node to join 2 outputs.

pivot is the best option I assume… but you can as well add a column with a fix input such as 1 and do a group by on this… not so elegant but works…:wink:

1 Like

You could also add in a Math Formula node at the end, and use the COL_MEAN() function on the Total column.

5 Likes

Employ the statistics node and look at overall sum for row.

1 Like

Hi there,

I just had the same problem. My solution was

  • to append a supportive column and
  • to use a pivot knode

In the pivot knode, you have to use the supportive column as a pivot and go on with your desired group/s and manual aggregation/s.

After that, you can insert a table manipulator knode and add an additional input port there. So you can bring together the pivot table (first output port) and the pivot totals (third output port).