Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amsystem
Partner - Contributor II
Partner - Contributor II

Problem accrued per month if there are no sales in the month

Good Morning.

I have the following script

Sales_Temp:

Load * inline

[Date, Customer, Amount

01/01/2016, a, 10

2/1/2016, a, 20

01/03/2016, a, 30

5/1/2016, a, 50

01/01/2016, b, 120

02/01/2016, b, 20

01/04/2016, b, 30

5/1/2016, b, 50

07/07/2016, b, 50

];

Sales:

Load

*,

Month as of the month

Resident Sales_Temp;

Drop table Sales_Temp;

The accumulated value for customer A in April should be 60 and appears null. In July it would be 110

The accumulated value for customer B in March should be 140

The formulas are as follows.

Accumulated Customer a and similar for customer b

     Aggr (

     Rangesum (above (sum ({$ <[Client] = {'a'}>}

     [Amount]), 0, rowNo (Total)))

     , Month)

Please I have to do so that instead of null appear the previous value for months that does not have sales.

Thank you.

Captura.JPG


2 Replies
spividori
Specialist
Specialist

Hi.

See the attached example.

Hope this help.

Regards.

amsystem
Partner - Contributor II
Partner - Contributor II
Author

Hi

It does not work.

The months without sales have zero values.

The same problem persists