Hi
I have this expression
sum
(aggr(sum(Time_Per_Day)*count(distinct Date), Date,OrderTxt, OrderID,CustomID) / 60)
How do I add so it only do the calculation for max(OrderID) for each CustomerID and DeparmentNr?
Today it sometimes gets wrong beacuse if a order are changed the first are not removed, instead a new are created and I only want to sum the time for the latest order
Please let me now if I should give a better context.
Edit: maybe hard to read in above textbox
sum(aggr(sum(Time_Per_Day)*count(distinct Date), Date,OrderTxt, OrderID,CustomID) / 60)