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: 
mall1m
Partner - Contributor III
Partner - Contributor III

Aggregated Calculation over a dynamic date interval

Dear everybody,

I have an algorithm question
I need to build a table that display several data and one date but I need to keep these data only if it fits the following condition:
Based on an interval of 10 days, I need to display :
- the first line
- the first line whom date exceed previous date by at least 10 days
- the next first line whom date exceed previous date by at least 10 days
- and so on

All calculations needs to be dynamic as
- interval will vary using a variable on user side
- start date will depend on selection
- at the end, I do not need to do this in a table ... i just have to "count" all "Yes" line using an aggregate function

Please find an example below

IDDateGap  Keep line ?Why
A101/01/2020   YesFirst line
A208/01/20207  No7 days from A1
A323/01/202015  Yes22 days > 10 from A1
A428/01/20205  No5 days from A3
A511/02/202014  Yes19 days > 10 from A3
A618/02/20207  No7 days from A5
A719/02/20201  No8 days from A5
A820/02/20201  No9 days from A5
A931/03/202040  Yes49 days > 10 from A5
A1008/04/20208  No8 days from A9
A1126/04/202018  Yes26 days > 10 from A9
A1212/05/202016  Yes16 days > 10 from A11
A1323/05/202011  Yes11 days > 10 from A13

 

I'm trying to achieve this calcaulation using above(), rangesum() ... without success until now

Thanks in advance for any help you could provide

Labels (3)
1 Reply
mall1m
Partner - Contributor III
Partner - Contributor III
Author

No idea ?