DriveWorks Pro 17: SppSumTableColumnByGroup [send feedback...]


Returns a two column table showing distinct values in the first column, and summed data in the second.


SppSumTableColumnByGroup([Table Array],[Group By Column],[Column To Sum])


Table Array is a Table Array (such as the data in a standard table, or the result of a QueryDataValues function.

Group By Column is the column in the Table Array that will be grouped.

Column To Sum is the column in the Table Array that will be summed for each unique value in the Group By Column.


SppSumTableColumnByGroup(DwLookupStationaryOrder,1,3){"Items","Sum(Quantity)";"2B Pencil",2;"Black Biro",2;"Rubber",1;"HB Pencil",5}Will return an Array showing distinct values from the first column and summed data from the third column.

Example Data

This table shows an example order and where some items may of been added to an order more than once and there quantities need adding together.

HB Pencil0.603
2B Pencil0.602
Black Biro0.801
HB Pencil0.602
Black Biro0.801

Table of Contents