Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
jerryr125
Professor-Ambassador
Professor-Ambassador

Sum - Previous Days quantity

 Hi - 

Is there a way to create a master measure that will do the following :

* at any given date take the previous days and sum the quantity of the previous days

Example:

08/5/2020 : Quantity 25;

08/6/2020 : Quantity 10; Master measure  = current date quantity + previous dates quantities = 35

08/7/2020 : Quantity 5; Master measure  = current date quantity + previous dates quantities = 40

08/8/2020 : Quantity 20; Master measure  = current date quantity + previous dates quantities = 60

08/9/2020 : Quantity 2 ; ; Master measure  = current date quantity + previous dates quantities = 62

 

Any thoughts ? Jerry

1 Solution

Accepted Solutions
iswarya
Partner
Partner

Hi,

Kindly find the attached app. Hope it helps!

 

View solution in original post

4 Replies
iswarya
Partner
Partner

Hi,

Kindly find the attached app. Hope it helps!

 

View solution in original post

jerryr125
Professor-Ambassador
Professor-Ambassador
Author

Thank you very much !  

Excellent example!

In the example, the master measure is the following :

aggr(Rangesum(Above(Sum(Qty),0,RowNo())),Date)

 

What if Qty is a master measure (say MMQTY) - how do I use the Master Measure in place of Qty ?

thoughts ? 

jerryr125
Professor-Ambassador
Professor-Ambassador
Author

Hi - update: 

I switch to variables and it working well.

OK next opportunity:

I have a total  Balance on Hand (BOH) of say 10000

I would like to do the following (as an example)

Date               Quantity   Cumulative Quantity   BOH-Cumulative Quantity

08/09/2020       20                                                         9980

08/10/2020     100                       120                            9880

08/11/2020     525                       645                           9355

 

What it is displaying now is the following :

Date               Quantity   Cumulative Quantity   BOH-Cumulative Quantity

08/09/2020       20                                                         9355

08/10/2020     100                       120                           9355

08/11/2020     200                       220                           9355

 

It seems that the BOH - Cumulative Quantity is displaying the final number and not the weekly number.

Any thoughts ? Jerry

jerryr125
Professor-Ambassador
Professor-Ambassador
Author

Solved - thank you very much !