While this invoice level file might be of some use in terms of analytics, it is more likely to be valuable as a means of gaining better insight regarding customer behavior. To obtain such insights, more preparation needs to be done before aggregating up to the customer level. Sorting the invoice file by CustomerID and date will make it possible to calculate the number of days between purchases, which could be used for a wide range of marketing/promotional decisions. It could also help identify customers that appear to have been lost due to lack of activity relative to their typical purchase pattern.
Second level aggregation
Preparing aggregated data for further use
To calculate the number of days between purchases, the Shift...