sum transactional dataHello, I'm trying to SUM the Quantity variable PER customerID. This is transactional data (sample below)
How to get that sum for each single customer when I have over 500K rows with 4K customers?
| Quantity | dummy | InvoiceDate | Total Purchase | UnitPrice | CustomerID | Country | days since |
| 1 | 11-Dec-11 | 10-Dec-11 | 50 | 50 | 14911 | EIRE | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 17.4 | 1.45 | 14911 | EIRE | 1 |
| 3 | 11-Dec-11 | 10-Dec-11 | 29.85 | 9.95 | 14911 | EIRE | 1 |
| 18 | 11-Dec-11 | 10-Dec-11 | 67.5 | 3.75 | 14911 | EIRE | 1 |
| 4 | 11-Dec-11 | 10-Dec-11 | 17 | 4.25 | 14911 | EIRE | 1 |
| 3 | 11-Dec-11 | 10-Dec-11 | 14.85 | 4.95 | 14911 | EIRE | 1 |
| 6 | 11-Dec-11 | 10-Dec-11 | 17.7 | 2.95 | 14911 | EIRE | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 10.2 | 0.85 | 17489 | United Kingdom | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 15 | 1.25 | 17489 | United Kingdom | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 19.8 | 1.65 | 17489 | United Kingdom | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 24.96 | 2.08 | 17489 | United Kingdom | 1 |
| 12 | 11-Dec-11 | 10-Dec-11 | 9.96 | 0.83 | 17489 | United Kingdom | 1 |
Re: sum transactional dataThank you very much!
Re: sum transactional dataYou can either use
Tables==>Summary
To create a new data table with your sum calculated per Customer ID
or
You can use
Analyze==>Tablulate
To create a report of the sum for each Customer ID
or
You can create a new column in your data table and use the following formula to generate the sum for each customer ID
Col Sum(:Quantity, :Customer ID)