Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

DateMonth

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

15 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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',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;

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
smilingjohn
Specialist
Specialist
Author

Thanks Kaushik

But this is giving the DateMonth only for mnday but it should also give me the DateMonth for begning of the first date of the month and Ending of the monthDate.

?

Is this possible ?

Now what u have give definitely this is needed  but it is giving me for monday and it did not show me the datemonth for the begning of the day.

For example date 1march started from wednesday ,  and 6th march is on monday ,current date month is showing from monday

I want it to show from the 1st march that is starting of the date day .

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

So are you saying that you want the new field which is date and month for 1st and last Month of the day along with all Mondays?

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Kushal_Chawda

try this

if(WeekDay(Date)  = 'Mon' or monthstart(Date)=Date or monthend(Date)=Date,Date(Field,'DD-MMM')) as New Date

smilingjohn
Specialist
Specialist
Author

Hi Kaushik

Exactly That is what i want

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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;

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!