Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with a expression

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)

0 Replies