Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need when I select credit date between 1st till 15th of every month then I should get value for ' Packing slip date field' as 18th for each month and when I select date between 16th to 31st then I should get value against ' Packing slip date field'. as 3rd of every month
Few eg are given below:-(Please refer screenshot attached for more clarity)
when I select
1.credit date 2.12.2019 I should get date as 18.12.2019 under field name 'Packing slip date'
2. Similarly if credit date is selected as 3.12.2019 then I should get date as 18.12.2019 under field name 'Packing slip date'
3. if credit date is selected as 6.1.2020 then I should get date as 18.1.2020 under field name 'Packing slip date'
4. and in else condition if I select credit date as 30-12-2019 then I should get date as 03.1.2020 under field name 'Packing slip date'
Regards
sakshi
Thanks...I was able to implement the same ....
Are you looking something like this?
SET DateFormat='DD.MM.YYYY';
tab1:
LOAD *, If(tmpD<16, MakeDate(tmpY, tmpM, 18), AddMonths(MakeDate(tmpY, tmpM, 3),1)) As [Packing slip date];
LOAD *, Day([Credit Note Date]) As tmpD, Month([Credit Note Date]) As tmpM, Year([Credit Note Date]) As tmpY;
LOAD * INLINE [
Batch, Batch_No, Credit Note Date
A, 2019-12-A, 02.12.2019
A, 2020-02-A, 03.02.2020
A, 2020-01-A, 06.01.2020
A, 2020-02-A, 10.02.2020
A, 2020-01-A, 13.01.2020
B, 2019-12-B, 16.12.2019
B, 2020-02-B, 17.02.2020
B, 2020-01-B, 20.01.2020
B, 2019-12-B, 23.12.2019
B, 2020-02-B, 24.02.2020
B, 2020-01-B, 27.01.2020
B, 2019-12-B, 30.12.2019
];
Drop Field tmpY, tmpM, tmpD;
Day 18 is not even an option under packing_slip_date... Are you able to share this qvw?
Maybe the following Design Blog post may provide an idea on how to get things into the buckets, but you will still need to attach those to the correct dates then, so the link after the specific one is the base blog URL you can use to search further for other posts that may help.
https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett
Thanks...I was able to implement the same ....
Are you looking something like this?
SET DateFormat='DD.MM.YYYY';
tab1:
LOAD *, If(tmpD<16, MakeDate(tmpY, tmpM, 18), AddMonths(MakeDate(tmpY, tmpM, 3),1)) As [Packing slip date];
LOAD *, Day([Credit Note Date]) As tmpD, Month([Credit Note Date]) As tmpM, Year([Credit Note Date]) As tmpY;
LOAD * INLINE [
Batch, Batch_No, Credit Note Date
A, 2019-12-A, 02.12.2019
A, 2020-02-A, 03.02.2020
A, 2020-01-A, 06.01.2020
A, 2020-02-A, 10.02.2020
A, 2020-01-A, 13.01.2020
B, 2019-12-B, 16.12.2019
B, 2020-02-B, 17.02.2020
B, 2020-01-B, 20.01.2020
B, 2019-12-B, 23.12.2019
B, 2020-02-B, 24.02.2020
B, 2020-01-B, 27.01.2020
B, 2019-12-B, 30.12.2019
];
Drop Field tmpY, tmpM, tmpD;