Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
liliem
Contributor
Contributor

counting sales after 7, 14, 21 days and after a month

Hi :),

I need to count sales in 7, 14, 21 days and after a month. I've prepared data which I include below:

first table is with id and sentDate:

table1:
load * Inline
[
id, sentDate
5902, 2021-07-16
5900, 2021-07-14
5877, 2021-07-01
5876, 2021-06-30
5421, 2021-07-13
]
;

and second table is with Invoice_num, date and email:

table2:
load * Inline
[
Invoice_num, date, email
Q/123, 2021-07-16, abc@gmail.com
W/123, 2021-07-17, abcedes@gmail.com
W/345, 2021-07-19, sff@gmail.com
W/952, 2021-07-19, dedff@gmail.com
W/9d52, 2021-07-23, dedff@gmail.com
W/987, 2021-07-25, bvc@gmail.com
S/145, 2021-07-05, ems@op.pl
T/486, 2021-07-13, yeft@gmail.com
E/415, 2021-01-01, yeft@gmail.com
E/4185, 2021-07-30, yeft@gmail.com
]
;

I would like also to connect these tables with that one below(optional):

tableEmail:
load * Inline
[
id, email
5902, abc@gmail.com
5902, abcedes@gmail.com
5902, sff@gmail.com
5900, abc@gmail.com
5877, bvc@gmail.com
5876, bpty@wp.pl
5877, ems@op.pl
5900, yeft@gmail.com
5900, sff@gmail.com
];

Final question is how to use interval match or master calendar to connect tables and display something like that:

id sentDate after 7 dayscount
542113.07.202120.07.20215
587630.06.202107.07.20211
587701.07.202108.07.20211
590014.07.202121.07.20214
590216.07.202123.07.20215

 

 

Labels (1)
0 Replies