Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
Can you help me with this please
I have a list of products as shown below..
i need to detect the first time this product was sold & then draw a graph were the date is the dimension and the number of products sold for the first time is presented.
i mean to have a graph identfying that :
on Sunday : 6 products were sold for the first time.
on monday : 4 products were sold for the first time.
on Tuesday : 1 product was sold for the first time.
on Wednesday: 4 products were sold for the first time.
on Thursday: 0
Thanks a lot guys
The solution probably depends a bit on your data model, but you could try creating a chart with dimension Date and then as expression something like
=sum(aggr( if( Date = FirstSortedValue(total<Product> Date,Date),1,0), Product,Date))
Hope this helps,
Stefan
hi,
You can do this easily in your Script. Usually I handle this in script by adding a additional flag. By using this flag I calculate the New Products count.
Example:
Products:
LOAD
ProductID,
OrderID,
Amount,
If(Previous(ProductID) <> ProductID, 1, 0) AS IsNewProductSold
FROM DataSource
ORDER BY Customer, OrderID;
Now, just using Sum(IsNewProductSold) you can get the NewProducts count.
Regards,
Jagan.