Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Pls help for below
how to make quarter in master calender
hI Abhay,
Try this,
Calendar:
Load
if(num(Month(DateField)) > 6 ,(Year(DateField) + 1),Year(DateField)) AS FIN_YEAR ,
if(num(month(DateField))>=1 and num(month(DateField))<=3,'Q4',
if(num(month(DateField))>=4 and num(month(DateField))<=6,'Q1',
if(num(month(DateField))>=7 and num(month(DateField))<=9,'Q2',
if(num(month(DateField))>=10 and num(month(DateField))<=12,'Q3')))) as FinancialQuarter
From Source;
Hi,
You can first define the startdate and enddate from your existing date field and then use forllowing script to create master calendar.After that link both Open_time and orig date to this calendar.Hope this will help.
LET varMinDate = StartDate; eg:'6/15/2001'
LET varMaxDate = EndDate; eg: Today();
//************TempCalendar***********
TempCalendar:
LOAD
$(varMinDate) + rowno() - 1 AS DateNumber,
date ($(varMinDate) + rowno() - 1) AS TempDate
AUTOGENERATE
$(varMaxDate) - $(varMinDate) + 1;
//*************Master Calendar************
MasterCalendar:
LOAD
TempDate AS Date,
Week (TempDate) AS Week,
Year (TempDate) AS Year,
Month (TempDate) AS Month,
Day (TempDate) AS Day,
Weekday (TempDate) AS WeekDay,
'Q' & Ceil(Month (TempDate)/3) AS Quarter,
Date( Monthstart (TempDate), 'MMM-YYYY') AS MonthYear,
Week (TempDate) & '-' & Year (TempDate) AS WeekYear
Resident TempCalendar
Order by TempDate ASC;
Drop Table TempCalendar;
Hi
Try like this
'Q' & Ceil(Month (DateField)/3) AS Quarter
Hi Abhay,
Try this:
'Q' & Ceil(Month (Date)/3) as Date_Quarter
Thanks,
AS
'Q' & Ceil(Month (Date)/3) as Quarter,