Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have customer table and sales table as below:
customer:
load * Inline
[
SalesRep, Customer, ZipCode, County
M, A, 00011, NY
M, A, 00022, NY
M, A, 00044, NY
M, A, 00055, CA
N, A, 00088, CA
];
sales:
load * Inline
[
Customer, Sales
A, 500
];
The result is like:
So customer A has five stores, with total sales 500. Is it possible to change it from script, so that each of these five store could have 100 sales, with total sales 500?
I would like to change this from script rather than layout, since my real data is big and have complex sales function, which would take too long time if using aggr() from layout.
Thanks in advance!
sales:
load * Inline
[
Customer, sum(Sales)/count(Customer) resident customer
group by customer
];
I got your idea. Thanks!