Announcements
Sept. 27, 10AM ET Do more with Qlik, Insight Advisor – our intelligent AI-assistant in Qlik Sense: Register
cancel
Showing results for
Did you mean:
Creator III

## Last Date Sold and Total # Orders Expression

Having a slow brain day.   I need to calculate  total orders per site for an item and the previous date sold.   Plan to use to identify items we should be stocking based on # turns?

 Date Site Customer Item Qty In Stock #TotalOrders Prev Date Sold On 01/01/2021 A Red 111 1 Y 02/05/2021 B Blue 222 1 N 06/03/2021 C Red 333 1 N 10/04/2021 B Green 111 1 N 18/04/2021 A Black 333 1 Y
Labels (1)
• ### General Question

3 Replies
MVP

Hi ,

Try with following expressions:

Expressions:

1. #Total Orders

sum({<Date={"\$(=Today())"}>} Qty)  or  sum({<Date={"\$(=Max(Date))"}>} Qty)

2.  Prev Date Sold On

sum({<Date={"\$(=Today()-1)"}>} Qty)  or  sum({<Date={"\$(=Max(Date)-1)"}>} Qty)

Hope this help.

Vikas

If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Creator III
Author

Hi Vikas, thanks for taking the time to reply!!  These will return the qty sold on the max date, whereas I'm looking for the actual date the item was last sold?

MVP

Do you have sold date captured in your data ? what date we can assume as a sold date?

Vikas