Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Find last Qty

Scenario

1. Customer chooses Month and Product

2. Month for the year at the time is "the Month", figure in Quantity of "Month-1"

If there is no Quantity at "Month-1", browse the past data of "Month-1" continuously to figure in the last Quantity

Example

Period

Product

Qty

2009-01

A

10

2009-02

B

20

2009-03

B

30

2009-04

A

50

Current Selection : Period is 2009-04, Product is A



We need last Qty ( description Scenario(2) ) is 10

Attached qvw file

plz, Somebody help me ?

2 Replies
spsrk_84
Creator III
Creator III

Hi,

I got one solution Please find the attached Qvw file in that file In the Script part i had written some logic by assuming the sccenario like

if the product name is same as previous and Year is same as Previous year and Month is greater than the previous Month in that scenario i am calculating the LastQty.

Hope this works........

Regards

ajay143

spsrk_84
Creator III
Creator III

Hi,

I forgot to attach the file please find the atached....