17 Replies Latest reply: Oct 12, 2017 11:36 AM by Beck Bakytbek

# FromDate, ToDate in Master Calender

Hi Folks,

i have a question, Is there any technique or procedure, how to implement FromDate and ToDate in Master Calender to use as one Field?

Thanks a lot for any feedback and response

Beck

• ###### Re: FromDate, ToDate in Master Calender

if([Effective Date]>='05/01/2014' and [Effective Date]<='08/01/2015'  ,[Effective Date]) as NewDate

This would give dates only in between above dates.

Is that what you looking for?

If date field is defined then probably do preceding load?

if([Effective Date]>='05/01/2014' and [Effective Date]<='08/01/2015'  ,[Effective Date]) as NewDate;

• ###### Re: FromDate, ToDate in Master Calender

Hi Aehman,

first of all thanks a lot for your response,

i am looking for the procedure, where i can implement the Fields: FROMDATE, TODATE into Mastercalender as one Field.

Do you have any ideas or technique to solve this issue?

Beck

• ###### Re: FromDate, ToDate in Master Calender

FromDate and ToDate are probably not best represented as fields in the calendar. They are usually implemented in variables, whicj you can then use in set expressions and calculated dimensions.

Perhaps you could explain exactly what end result you are pursuing?

• ###### Re: FromDate, ToDate in Master Calender

Try this procedure to create dates between "FROMDATE" and "TODATE"

Temp_Date_Range:

num(Min(DATE("Close_Date"))) as FromDate,

num(Max(DATE("Close_Date"))) as ToDate

Resident  Data_Table;

LET vMinDate=Peek('FromDate',0,'Temp_Date_Range');

LET vMaxDate=Peek('ToDate',0,'Temp_Date_Range');

drop table  Temp_Date_Range;

MasterCalender:

\$(vMinDate) +IterNo()-1 as Temp_Date

AutoGenerate(1)

while IterNo()+\$(vMinDate)-1<=\$(vMaxDate);

Regards

• ###### Re: FromDate, ToDate in Master Calender

Hi Patil,

the Field: 'Close_Date' , what do you mean with Close_Date? Because i have only 2 Fields: FROMDATE and TODATE

Thanks a lot

Beck

• ###### Re: FromDate, ToDate in Master Calender

We can use  Set analysis but this is one of the way of generating dates between MIn and Max Dates.

In Data_Table Close_Date is Date of transaction .i am searching MIN Date and MAX Date to create Dates between MIN & MAX dates.

I used  Variable in looping .variable use is better than write ( num(Min(DATE("Close_Date"))) )

even in looping date should be in Number format.

Regards

• ###### Re: FromDate, ToDate in Master Calender

Thanks a lot Patil for your response and feedback

• ###### Re: FromDate, ToDate in Master Calender

If you want two or more date fields to be represented by one field, you should create a Canonical Date:

If you want to generate all dates between the two, you should create a reference date:

HIC

• ###### Re: FromDate, ToDate in Master Calender

Hi Henric,

Thanks a lot for your feedback and responce, i will try to implement it and will report, when i achieve the solution for my issue.

Thanks a lot

Beck

• ###### Re: FromDate, ToDate in Master Calender

Hi

if Form Date and To date are not exactly fields then you can use the date field from master calender in 2 different state and use one of them as from date and another as to date in your calculation.

regards

• ###### Re: FromDate, ToDate in Master Calender

thanks a lot for your feedback and response, i postet to this issue an another issue:

do you have any idea?

Beck

• ###### Re: FromDate, ToDate in Master Calender

regards

• ###### Re: FromDate, ToDate in Master Calender

if ithis solved, as matter of course i will do this

• ###### Re: FromDate, ToDate in Master Calender

where exactly are you struck ?

• ###### Re: FromDate, ToDate in Master Calender

in this issue

• ###### Re: FromDate, ToDate in Master Calender

Hi Folks,

i solved this issue by this way:

load date(FROMDATE + iterno() - 1) as DATE, [Amount] / (TODATE - FROMDATE) as DailyAmoount

from Source while FROMDATE + iterno() - 1 <= TODATE;

and after reload i do concatenate the Field: DATE with MasterCalender

i hope that helps

Beck