Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Script Help

Hi,

I have two field i.e. - Invoice Date and Amount, I need the same out like this :

  

Invoice DateAmountOutput -->Invoice DateAmount
01/01/20151 31/01/2015301
02/01/201511 28/02/2015581
03/01/201521 31/03/2015891
04/01/201531 01/04/2015901
05/01/201541 02/04/2015911
06/01/201551 03/04/2015921
07/01/201561 04/04/2015931
08/01/201571 05/04/2015941
09/01/201581 06/04/2015951
10/01/201591 07/04/2015961
11/01/2015101 08/04/2015971
12/01/2015111 09/04/2015981
13/01/2015121 10/04/2015991
14/01/2015131 11/04/20151001
15/01/2015141 12/04/20151011
16/01/2015151 13/04/20151021
17/01/2015161 14/04/20151031
18/01/2015171 15/04/20151041
19/01/2015181 16/04/20151051
20/01/2015191 17/04/20151061
21/01/2015201 18/04/20151071
22/01/2015211 19/04/20151081
23/01/2015221 20/04/20151091
24/01/2015231 21/04/20151101
25/01/2015241 22/04/20151111
26/01/2015251 23/04/20151121
27/01/2015261 24/04/20151131
28/01/2015271 25/04/20151141
29/01/2015281 26/04/20151151
30/01/2015291 27/04/20151161
31/01/2015301 28/04/20151171
01/02/2015311 29/04/20151181
02/02/2015321 30/04/20151191
03/02/2015331
04/02/2015341
05/02/2015351
06/02/2015361
07/02/2015371
08/02/2015381
09/02/2015391
10/02/2015401
11/02/2015411
12/02/2015421
13/02/2015431
14/02/2015441
15/02/2015451
16/02/2015461
17/02/2015471
18/02/2015481
19/02/2015491
20/02/2015501
21/02/2015511
22/02/2015521
23/02/2015531
24/02/2015541
25/02/2015551
26/02/2015561
27/02/2015571
28/02/2015581
01/03/2015591
02/03/2015601
03/03/2015611
04/03/2015621
05/03/2015631
06/03/2015641
07/03/2015651
08/03/2015661
09/03/2015671
10/03/2015681
11/03/2015691
12/03/2015701
13/03/2015711
14/03/2015721
15/03/2015731
16/03/2015741
17/03/2015751
18/03/2015761
19/03/2015771
20/03/2015781
21/03/2015791
22/03/2015801
23/03/2015811
24/03/2015821
25/03/2015831
26/03/2015841
27/03/2015851
28/03/2015861
29/03/2015871
30/03/2015881
31/03/2015891
01/04/2015901
02/04/2015911
03/04/2015921
04/04/2015931
05/04/2015941
06/04/2015951
07/04/2015961
08/04/2015971
09/04/2015981
10/04/2015991
11/04/20151001
12/04/20151011
13/04/20151021
14/04/20151031
15/04/20151041
16/04/20151051
17/04/20151061
18/04/20151071
19/04/20151081
20/04/20151091
21/04/20151101
22/04/20151111
23/04/20151121
24/04/20151131
25/04/20151141
26/04/20151151
27/04/20151161
28/04/20151171
29/04/20151181
30/04/20151191
01/05/20151201

Please suggest what I should to do in my script for the same output.

Thanks for help in advance.

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

I think I read your question a bit too quickly. Here is a updated version where all the last dates of each month is flagged, and all dates in the last full month. I hope you get the principle on how to approach the issue from my examples.

View solution in original post

4 Replies
maxgro
MVP
MVP

LOAD

     [Invoice Date],

     Amount

FROM

TEST.xlsx

(ooxml, embedded labels, table is Data)

Where

  ([Invoice Date] = floor(MonthEnd([Invoice Date])) and [Invoice Date]<makedate(2015,4))

  or

  ([Invoice Date]>= monthstart(makedate(2015,4)) and [Invoice Date]<=MonthEnd(MakeDate(2015,4)))

;

ToniKautto
Employee
Employee

Add a calendar table with a flag showing the last date of the month.

Use a set expression that targets the last date of the month.

Calendar with period flags

Please remember to mark answers as helpful or correct, so that other community members know if further input is required.

ToniKautto
Employee
Employee

I think I read your question a bit too quickly. Here is a updated version where all the last dates of each month is flagged, and all dates in the last full month. I hope you get the principle on how to approach the issue from my examples.

ToniKautto
Employee
Employee

This is a duplicate of script help

I have closed this thread.