Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dmac1971
Creator III
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


#Total
Orders

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)
3 Replies
vikasmahajan

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

Hope this resolve your issue.
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.
dmac1971
Creator III
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?

vikasmahajan

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

Vikas

Hope this resolve your issue.
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.