Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Re: SQL Sub Query Equivalent in Qlik Sense

Table:

Date,Sales

08-06-2016,9

12-06-2016,3

20-07-2016,9

14-07-2016,1

19-08-2016,10

22-08-2016,2

25-12-2016,0

OutPut:

Date,Sales,Selective_Sum

18-06-2016,9,0

12-06-2016,3,9

20-07-2016,9,12

14-07-2016,1,21

19-08-2016,10,23

22-08-2016,2,20

25-12-2016,0,0

Logic: Selective_Sum = Sum of Sales in Last Two Months from the current date for each row.

If I were to do this is SQL ,that would be a piece of cake using a subquery.

Note: You are free to order things up.

Note: There are gaps between the dates.

Please avoid loops,Above, Aggr if possible.

Thanks alot in advance.

2 Replies
Gysbert_Wassenaar

Please don't clutter this site with duplicate discussions: SQL SubQuery Equivalent in QlikScript?


talk is cheap, supply exceeds demand
Not applicable
Author

Ty for your concern for this site, I want to point out the key difference b/w those two question, kindly look into the date gaps between input sample space of each scenarios, Which is the realistic problem that I am trying to solve this past week. Hope I'll get a positive reply!