Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have the master calendar which works perfectly
I just want to know how do we get the date like this
14-Jan
15-jan
.
.
.
.
.
30-dec now iam geting only month but ther is no date prefix to it
thanks
FiscalCalendar:
LOAD
*,
Dual('Q' & Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter
Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name
LOAD
*,
Year(Date) AS Year, // Standard Calendar Year
Month(Date) AS Month, // Standard Calendar Month
week(Date) As Week,
//Date(Date ,'DD-MMM') as DateMonth,
if(WeekDay(Date) = 'Mon' or Floor(Date) = Floor(Monthstart(Date)) or Floor(Date) = Floor(Monthend(Date)),Date(Date,'DD-MMM')) as DateMonth,
Date(MonthEnd(Date), 'MMM') AS MonthName, // Standard Calendar Month Name
//Dual('Q' & Ceil(Month(Date)/3), Ceil(Month(Date)/3)) AS Quarter, // Standard Calendar Quarter
'Q' & Ceil(Month(Date)/3) & '-' & Year(Date) as Quarter,
Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Month
Right(YearName(Date,0,$(vFiscalYearStartMonth)),4)as FiscalYear,
date(MonthStart(Date),'MMM-YY') AS MonthYear,
YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYearr; // Fiscal Year
LOAD
Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,
RangeSum(Peek('RowNum'), 1) AS RowNum
AutoGenerate vEndDate - vStartDate + 1;
Hi,
You can use the date function like below.
Date(DateField ,'DD-MMM') as DateMonth
Regards,
Kaushik Solanki
create datemonth field as
Month(Datefield,'DD-MMM') as DateMonth
Do you have Date field in your data?
It works but the DateMonth field is showing all the date right from 1 to 30
I want it to display one weeks date for example like
14-Nov
21-Nov
28-Nov
.
.
.and so on
That is the begining of the week datmonth
try this
date(Weekstart(DateField),'DD-MMM') as DateMonth
Try this,
Weekname(Datefield) As week
Regards,
Kaushik Solanki
How to get the Only date month field for mondays ? (Starting from the first day of the week)
For example
like this snap shot
THanks
If you just need for Monday then you can try this.
Load if(WeekDay(Date) = 'Mon',Date(Field,'DD-MMM')) as New Date
From xyz.
Regards,
Kaushik Solanki
Hi Kasuhi
I have the master Calendar already please look into the below script , out of my date field i want to get this DateMonth
MaxMin:
LOAD Max(Date) as MaxDate,
Min(Date) as MinDate
Resident FluData;
SET vFiscalYearStartMonth = 4;
let vStartDate=Peek('MinDate');
let vEndDate=Peek('MaxDate');
FiscalCalendar:
LOAD
*,
Dual('Q' & Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter
Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name
LOAD
*,
Year(Date) AS Year, // Standard Calendar Year
Month(Date) AS Month, // Standard Calendar Month
week(Date) As Week,
Date(Date ,'DD-MMM') as DateMonth,
Date(MonthEnd(Date), 'MMM') AS MonthName, // Standard Calendar Month Name
//Dual('Q' & Ceil(Month(Date)/3), Ceil(Month(Date)/3)) AS Quarter, // Standard Calendar Quarter
'Q' & Ceil(Month(Date)/3) & '-' & Year(Date) as Quarter,
Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Month
Right(YearName(Date,0,$(vFiscalYearStartMonth)),4)as FiscalYear,
date(MonthStart(Date),'MMM-YY') AS MonthYear,
YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYearr; // Fiscal Year
LOAD
Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,
RangeSum(Peek('RowNum'), 1) AS RowNum
AutoGenerate vEndDate - vStartDate + 1;