Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to generate a dynamic date in the script (for short period is it a fix date) for all orders (ID), which I can compare with a delivery date. At the end I would like to show all orders in the chart with a delivery date before the dynamic date and hide all order in the chart after the dynamic date --> if(dynamic date >= delivery date, delivery date, 'not relevant')
As dynamic date I would like to have the first MonthYear (e.g. 04.2015 or 07.2015 or 10.2015 or 01.2016....) of each quarter but always the smallest one. For example the next smallest dynamic MonthYear is 04.2015 and as soon as we reached 04.2015, then it switched to the next 07.2015 and so on...
How can I do it? Below you can see what I mean.
Order no. | Delivery Date | Delivery MonthYear | Dynamic MonthYear |
0001114992\001000 | 29.01.2015 | 01 2015 | 04 2015 |
0001114511\001000 | 16.02.2015 | 02 2015 | 04 2015 |
0001115038\001000 | 10.04.2015 | 04 2015 | 04 2015 |
0001115485\001000 | 12.05.2015 | 05 2015 | 04 2015 |
0001115469\001000 | 03.07.2015 | 07 2015 | 04 2015 |
BR
Michael
Hi Andrei,
finally you helped me with your answer. I only add one "shift" paremeter (=1) more with result it shows me the first month of the following quarrter.)
LOAD
...
date(QuarterStart(today(),1),'MM.YYYY') as [Dynamic Month Year]
FROM datasource;
Thanks!
BR
Hi,
Use below expression in script
LOAD
...
date(QuarterStart(today()),'MM.YYYY') as [Dynamic Month Year]
FROM datasource;
Hope this helps.
Regards,
Andrei Kaliahin
Hi Andrei,
I can try it but I expect as result the current MonthYear = 01.2015, but I always need the next one and from today view it is 04.2015.
What do you mean?
Hi Andrei,
As expected the result is 01 2015. Do you or somebody else have any other idea?
BR
Michael
Hi Andrei,
finally you helped me with your answer. I only add one "shift" paremeter (=1) more with result it shows me the first month of the following quarrter.)
LOAD
...
date(QuarterStart(today(),1),'MM.YYYY') as [Dynamic Month Year]
FROM datasource;
Thanks!
BR