Hello all,
I'm trying to output the following data from Business One in a query or queries in order to calculate the Lifetime Value of customers from various sources.
- BP Code
- BP Name
- BP Email
- Date of first Sales Order (need to be able to specify between two dates)
- Total Value of first Sales Order
- UDF from the first Sales Order (a custom field called U_WebReferrer which is populated with the source channel)
- Total number of Sale Orders
- Total Sales Orders Value (excluding tax) (need to able to specify between two dates)
- Total Gross Profit
- Total Gross Profit %
Using the data above I want to specify all the customers who, for instance, first placed an order between 20130101 and 20130131 and then give the Totals for points 7, 8, 9, 10 between two other dates, for instance, 20130101 and 20131231.
I hope that makes sense? I am really struggling to output the above data, can anyone assist please?
Many thanks