Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need count the days of a customer buy our product and then sum the quantity of product in the month the customer buy to obtain the Average by day by product that this customer is buying.
And then create a Range like:
0 to 5
5 to 10
10 to 15
-.......
over 60.
and calculate how many customer by products average I have in the one of the ranges.
But in the aggregations functions on the load I have the problem that forward:
Invalid expression
Movimientos2009:
LOAD RECNO() AS INDEX,
cod_producto,
cod_cliente,
cod_sucursal,
año,
mes,
dia,
cod_fecha,
cantidad,
kilos,
dolares,
indiventa,
count(distinct dia) as diacompra,
sum(cantidad)/COUNT(DISTINCT dia) as avgsale,
vendedor
FROM
QVD\movimientos2009.qvd
(qvd)
group by cod_producto,
mes;
Every field must be either in the group by, or calculated using an aggregation.
Every field must be either in the group by, or calculated using an aggregation.