Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

common date

Newbie needing help here.. been trying to solve this for days.. using the canonical dates tutorial..

mine is different though as all of the dates should show up the same

I have 4 dates

Fin_Month

Cust_Month

Snapshot_Month

People_Month

tried to create a tempcal and master calendar.. but its isolated from the rest of my data

i would like to just select Snapshot Month and it should automatically select the same months as well

RepMonthSnapshot MonthCust_MonthFin_Month
31-Dec-1412/31/201412/31/201412/31/2014
31-Jan-1501/31/201501/31/201501/31/2015
28-Feb-1502/28/201502/28/201502/28/2015
31-Mar-1503/31/201503/31/201503/31/2015
30-Apr-1504/30/201504/30/201504/30/2015
31-May-1505/31/201505/31/201505/31/2015
30-Jun-1506/30/201506/30/201506/30/2015
31-Jul-1507/31/201507/31/201507/31/2015
31-Aug-1508/31/201508/31/201508/31/2015
30-Sep-1509/30/201509/30/201509/30/2015
31-Oct-1510/31/201510/31/201510/31/2015
30-Nov-1511/30/201511/30/201511/30/2015
31-Dec-1512/31/201512/31/201512/31/2015
23 Replies
sibideepak
Creator II
Creator II

Hi laniefran,

Can you little elaborate your requirement ??

Not applicable
Author

hi deepak

i cant link my master link to my data

Capture.PNG

Not applicable
Author

tempcal:

Load
Date([Snapshot Month]) as CommonDate
Resident weekly_outstanding;
Concatenate
Load
Date(Fin_Month) as CommonDate
Resident financials;
Concatenate
Load
Date(Cust_Month) as CommonDate
Resident customer_actuals;

mastercalendar:
Load
'Common'
as DateType,
Date('YY-MMM-DD') as CommonDate,
Year(CommonDate) as CommonYear,
Month(CommonDate) as CommonMonth
Resident tempcal;
Drop Table tempcal;

sibideepak
Creator II
Creator II

Hi laniefran,

Try to make your data model with either star schema or snow flake schema ,

And try to make all dates to be in one or two table and assign those Dates as CommonDate.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

I think you need a full master calendar for your CommonDates.

Update your calendar tab with this

    

tempcal:
Load
Date([Snapshot Month]) as CommonDate
Resident weekly_outstanding;
Concatenate
Load
Date(Fin_Month) as CommonDate
Resident financials;
Concatenate
Load
Date(Cust_Month) as CommonDate
Resident customer_actuals;

Temp:
LOAD

Min(CommonDate) as MinDate,
Max(CommonDate) as MaxDate
Resident tempcal;

Let varMinDate = Num(Peek('MinDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('MaxDate', 0, 'Temp'));

TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);



mastercalendar:
Load

CommonDate     AS RepMonth
Date('YY-MMM-DD') as CommonDate,
Year(CommonDate) as CommonYear,
Month(CommonDate) as CommonMonth
Resident TempCalendar;
DROP Table TempCalendar;

Hopefully that will give you full calendar linking


jpenuliar
Partner - Specialist III
Partner - Specialist III

Ate Lanie,

have a look at this Thread to first generate a Master calendar using a Script.

then go back to the common Calendar Tutorial how to link the SnapshotMonths,Fin_Months & Cust_Month to the Master Calendar.

JP

Not applicable
Author

cannot find CommonDate

sibideepak
Creator II
Creator II

Use TempDate instead CommonDate in Gabsus04 example

Not applicable
Author

which thread po