Qlik Community

Qlik Sense App Development

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

amsystem
New 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
Valued Contributor

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

Hi.

See the attached example.

Hope this help.

Regards.

amsystem
New Contributor II

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

Hi

It does not work.

The months without sales have zero values.

The same problem persists

Community Browser