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

Previous Day Sales

I have a field, transDATE, representative of the transaction date. I have a field [Net Sold Qty] representative of the number of tickets sold.

I want to create a column within a table that shows the previous day sales. So if today, I have 10,000 tickets sold, but yesterday, I had 9,900 tickets sold, i want to be able to show that there were 100 tickets sold.

Would I set this up in the script or in an expression? What would this look

1 Solution

Accepted Solutions
evansabres
Specialist
Specialist
Author

I think I actually found my answer

=sum({<transDATE={'$(=Date(max(transDATE,2)))'}>} [Net Sold Qty])

View solution in original post

2 Replies
isingh30
Specialist
Specialist

Did you try previous function like this -

previous(transDATE)


Use this in the main script


Thank you!

evansabres
Specialist
Specialist
Author

I think I actually found my answer

=sum({<transDATE={'$(=Date(max(transDATE,2)))'}>} [Net Sold Qty])