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: 
Not applicable

script help

Hi,

I have two field i.e. - Invoice Date and Amount, I want this

    

Invoice DateAmountOutput -->Invoice DateAmount
01/01/2015131/01/2015301
02/01/20151128/02/2015581
03/01/20152131/03/2015891
04/01/20153130/04/20151191
05/01/20154101/05/20151201
06/01/20155102/05/20151211
07/01/20156103/05/20151221
08/01/20157104/05/20151231
09/01/20158105/05/20151241
10/01/20159106/05/20151251
11/01/201510107/05/20151261
12/01/201511108/05/20151271
13/01/201512109/05/20151281
14/01/201513110/05/20151291
15/01/201514111/05/20151301
16/01/201515112/05/20151311
17/01/201516113/05/20151321
18/01/201517114/05/20151331
19/01/201518115/05/20151341
20/01/2015191
21/01/2015201
22/01/2015211
23/01/2015221
24/01/2015231
25/01/2015241
26/01/2015251
27/01/2015261
28/01/2015271
29/01/2015281
30/01/2015291
31/01/2015301
01/02/2015311
02/02/2015321
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
02/05/20151211
03/05/20151221
04/05/20151231
05/05/20151241
06/05/20151251
07/05/20151261
08/05/20151271
09/05/20151281
10/05/20151291
11/05/20151301
12/05/20151311
13/05/20151321
14/05/20151331
15/05/20151341

  

24 Replies
sona_sa
Creator II
Creator II

Hi Peter,

Why you are thinking I am having any session or testing. I am a new developer and trying to learn something.

Here in Input Invoice Date Date is till 1st May 2015 - OutPut is for Apr Month Entire date is available and prior month (Jan / Feb / Mar) -- Monthend Date is coming.

In Fig. 2 --> In Input Invoice Date after 1st May there is Date available for 2nd or 3rd, So Output is for previous month is Monthend Date but for current month entire 3 date is available.

Means whenever if new month come or first day of month is available for current month the it will return Output 1 else output 2.

If maxdate is 1 then return me previous month entire date else return me till date and for previous month - monthend date.

Hope you got my point.

petter
Partner - Champion III
Partner - Champion III

Why don't you give credit to some or even one of the experts that have tried to help you yet? You should press LIKE and/or HELPFUL. It seems like you have no better thing to do than wasting peoples time and not even thanking them except for writing "Thanks for the reply" which is not a genuine thank anyway ...

sona_sa
Creator II
Creator II

   Ok.

petter
Partner - Champion III
Partner - Champion III

I am sorry that I need to be so direct and I hope you take it in the spirit it is given - to contribute to learning and for this forum to grow and prosper so people enjoy coming here both practitioners and learners:

You should be respecting other people time and effort. The is #1. #2: I can only judge by what you write and give as feedback - not what you actually are doing at home or work.

And your last answer didn't address my concern that you are making an effort to solve anything yourself - except testing and giving feedback.

You should have a closer look and consideration of forum etiquette and be short and concise. Then when you get a feedback seriously try to incorporate the suggestion into your solution. If you are not successful - then post an update which also shows your contribution towards a solution. Give credit by clicking LIKE and HELPFUL and finally reward someone with ANSWERED. Saying thank you all the time doesn't compensate for that.

If you don't do this - people will not feel that this is a mutual or beneficial interaction between respectful peers. Or even being a experienced to learner interaction that is also rewarding...

I seriously hope you learn a lot of Qlik(View) things but also try to learn and understand that a forum needs to be fueled by enthusiasm and positive but honest efforts and feedback.

Good luck with your learning efforts - in all respects

ToniKautto
Employee
Employee

Just as a note, I have closed you duplicate threads. Please do not re-post the same question multiple times in the future.

My approach to these kind of scenarios is to flag the data during load, so that you can target the required data through a simple set expression. In the attached example you can see that I have added a calendar table, in which I add a flag field to indicate the date ranges that interest me. In the chart object I simple select this flag for the aggregation. In my opinion this is a much simpler approach than building a very complex expression or a calculated dimension. For large data sets the flag approach will be very performance efficient.