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: 
sona_sa
Creator II
Creator II

Script Help

Hi,

I need some help in QlikView script code, Please help me on this.

I have 2 field Invoice date and amount, I need same out put, please check the below mention data:

    

Invoice Date

Amount

Output -->

Invoice Date

Amount

01/01/2015

1

31/01/2015

301

02/01/2015

11

28/02/2015

581

03/01/2015

21

31/03/2015

891

04/01/2015

31

01/04/2015

901

05/01/2015

41

02/04/2015

911

06/01/2015

51

03/04/2015

921

07/01/2015

61

04/04/2015

931

08/01/2015

71

05/04/2015

941

09/01/2015

81

06/04/2015

951

10/01/2015

91

07/04/2015

961

11/01/2015

101

08/04/2015

971

12/01/2015

111

09/04/2015

981

13/01/2015

121

10/04/2015

991

14/01/2015

131

11/04/2015

1001

15/01/2015

141

12/04/2015

1011

16/01/2015

151

13/04/2015

1021

17/01/2015

161

14/04/2015

1031

18/01/2015

171

15/04/2015

1041

19/01/2015

181

16/04/2015

1051

20/01/2015

191

17/04/2015

1061

21/01/2015

201

18/04/2015

1071

22/01/2015

211

19/04/2015

1081

23/01/2015

221

20/04/2015

1091

24/01/2015

231

21/04/2015

1101

25/01/2015

241

22/04/2015

1111

26/01/2015

251

23/04/2015

1121

27/01/2015

261

24/04/2015

1131

28/01/2015

271

25/04/2015

1141

29/01/2015

281

26/04/2015

1151

30/01/2015

291

27/04/2015

1161

31/01/2015

301

28/04/2015

1171

01/02/2015

311

29/04/2015

1181

02/02/2015

321

30/04/2015

1191

03/02/2015

331

04/02/2015

341

05/02/2015

351

06/02/2015

361

07/02/2015

371

08/02/2015

381

09/02/2015

391

10/02/2015

401

11/02/2015

411

12/02/2015

421

13/02/2015

431

14/02/2015

441

15/02/2015

451

16/02/2015

461

17/02/2015

471

18/02/2015

481

19/02/2015

491

20/02/2015

501

21/02/2015

511

22/02/2015

521

23/02/2015

531

24/02/2015

541

25/02/2015

551

26/02/2015

561

27/02/2015

571

28/02/2015

581

01/03/2015

591

02/03/2015

601

03/03/2015

611

04/03/2015

621

05/03/2015

631

06/03/2015

641

07/03/2015

651

08/03/2015

661

09/03/2015

671

10/03/2015

681

11/03/2015

691

12/03/2015

701

13/03/2015

711

14/03/2015

721

15/03/2015

731

16/03/2015

741

17/03/2015

751

18/03/2015

761

19/03/2015

771

20/03/2015

781

21/03/2015

791

22/03/2015

801

23/03/2015

811

24/03/2015

821

25/03/2015

831

26/03/2015

841

27/03/2015

851

28/03/2015

861

29/03/2015

871

30/03/2015

881

31/03/2015

891

01/04/2015

901

02/04/2015

911

03/04/2015

921

04/04/2015

931

05/04/2015

941

06/04/2015

951

07/04/2015

961

08/04/2015

971

09/04/2015

981

10/04/2015

991

11/04/2015

1001

12/04/2015

1011

13/04/2015

1021

14/04/2015

1031

15/04/2015

1041

16/04/2015

1051

17/04/2015

1061

18/04/2015

1071

19/04/2015

1081

20/04/2015

1091

21/04/2015

1101

22/04/2015

1111

23/04/2015

1121

24/04/2015

1131

25/04/2015

1141

26/04/2015

1151

27/04/2015

1161

28/04/2015

1171

29/04/2015

1181

30/04/2015

1191

01/05/2015

1201



Please give me some ideas on the same. I want the same in QlikView script at the time on load and Output should to come by script.


Thanks in advance.

3 Replies
Gysbert_Wassenaar

Please don't clutter this site with duplicate discussions:

script help

Scripting Help required

It doesn't matter if you use another account to repost your question again after you already received answers in two earlier discussions. Do not post duplicate discussion please!


talk is cheap, supply exceeds demand
sona_sa
Creator II
Creator II
Author

Sorry I did not check that.

Also That is not a correct answer.

I need the same in script.

  1. 1. Suppose I have 6 month data from 1st Jan 2015 to 1 July 2015 with amount. Then I want from Jan to May 2015, the day will come for end of the month date. Like 31st Jan, 28th Feb, 31 Mar, 30th Apr and 31st May. And for June month entire date will come, for 1st July 2015 will not come. 

  1. 2. But if 2nd July is available then 31st Jan, 28th Feb, 31 Mar, 30th Apr, 31st May, 30th June, 1st July and 2nd July will be there. Similarly, it will continue and till 30 it will continue again for next month when 1st will come then again point 1 will apply.


I am using the- If(Month(Invoice_Date) = Month(Today()), Invoice_Date, Monthend(Invoice_Date)), Output is coming,


But in scenario - Suppose today is month start date Then I want for every month it should to give the Monthend date and for previous month it will return from month start date to end of the month, and when my 2nd or 3rd date will come then similarly it will return every monthend date, and for current month it will return 3 dates.


Why I am doing the same, Becuse suppose for any days the scheduler get failed and data is not reload, So I can find the data on the base of maxdate of month.


Can we do it by using any variable = where we can assisng max date and we can pass it in the same if and else condition.


Thanks.

ToniKautto
Employee
Employee

I have closed this thread. Please refer to the duplicate Re: script help