Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to calculate Bi-weekly dates, i referred to this discussion Creating Bi Weekly in Master Calendar and used the same calculation i.e dual(text(weekstart(create_date)),div(weekstart(create_date),14)) as "BiWeekdate".
This is giving me inconsistent dates like shown below. Since the interval is 14 days, for example after 27/12/2015 the next bi-weekly date should be 10/01/2016 but instead it shows 17/01/2016.
What could be the reason? Anything missing here? Any help is appreciated.
Thanks
Swetha
The formula is wrong. Try the following instead:
Date(2+14*Div(create_date-2,14)) as BiweekStart
HIC
Do you have data on 10/01/2016?
If not: Did you uncheck the box where teh visualisation doesn't display Null-values?
Hi Isabelle, there is data for 10/01/2016 and the Show Null values check box is true.
Thanks
Swetha
The formula is wrong. Try the following instead:
Date(2+14*Div(create_date-2,14)) as BiweekStart
HIC
Thanks Henric.. that worked like a charm.
Thanks
Swetha
Hi,
maybe also possible:
Date(Floor(Date,14,2)) as BiWeekDate
LOAD *,
WeekStart(Date) as WeekStart,
Date(Floor(Date,14,2)) as BiWeekDate;
LOAD Date(MakeDate(2015,12,28)+RecNo()-1) as Date
AutoGenerate Today()-MakeDate(2015,12,28)+1;
hope this helps
regards
Marco
or to let weeks start on sundays, like in your case:
Date(Floor(Date,14,1)) as BiWeekDate
regards
Marco