Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to implement running total in date range for each group in script load

Dear All, I have a problem in running total data in script load.

So have any solution for this case or not?

My data like below:

Data2:

Load * Inline [

date, flag, pic

1, 1, a

2, 1, a

4, 0, a

5, 0, a

7, 1, a

9, 1, a

10, 1, a

1, 0, b

2, 1, b

3, 1, b

4, 1, b

5, 0, b

6, 0, b

3, 0, c

4, 1, c

5, 1, c

6, 0, c

7, 0, c

];

My problem: Generate field [flag within 3 previous days] : at current row of [date] field, mark 1 for [flag within 3 previous days] if in 3 previous days have [flag]=1 for each group of [pic]

My expected result:

 

datepicflagflag within 3 previous days
1a11
2a11
3a11
4a11
5a00
6a00
7a11
8a11
9a11
10a11
1b00
2b11
3b11
4b11
5b11
6b11
7b00
8b00
3c00
4c11
5c11
6c11
7c11
8c00
9c00
0 Replies