Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

dynamic date

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 DateDelivery MonthYearDynamic MonthYear
0001114992\00100029.01.201501 201504 2015
0001114511\00100016.02.201502 201504 2015
0001115038\00100010.04.201504 201504 2015
0001115485\00100012.05.201505 201504 2015
0001115469\00100003.07.201507 201504 2015

BR

Michael

1 Solution

Accepted Solutions
maternmi
Creator II
Creator II
Author

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

View solution in original post

4 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

Use below expression in script

LOAD

...

date(QuarterStart(today()),'MM.YYYY') as [Dynamic Month Year]

FROM datasource;

Hope this helps.

Regards,

Andrei Kaliahin

maternmi
Creator II
Creator II
Author

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?

maternmi
Creator II
Creator II
Author

Hi Andrei,

As expected the result is 01 2015. Do you or somebody else have any other idea?

BR

Michael

maternmi
Creator II
Creator II
Author

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