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: 
nareshthavidishetty
Creator III
Creator III

FY Week

Hi,

I'm using the below calendar.

FY year is FEB to FEB.

Here i need to get week numbers as well which week1 is 1st week of FEB.

Thanks..

5 Replies
sunny_talwar

If you create a fiscal year calendar, the week should be fixed automatically

Fiscal and Standard Calendar generation

nareshthavidishetty
Creator III
Creator III
Author

Below is the calendar we are using.Here i need week as well.

MinMax:

LOAD Min(SoldDate) as MinDate,

  Max(SoldDate) as MaxDate

Resident TrafficCounters;

SET vFiscalYearStartMonth = 2;

LET vStartDate = Peek('MinDate');

LET vEndDate = Peek('MaxDate');

DROP Table MinMax;

FiscalCalendar:

LOAD *,

  Dual('Q' & Ceil(FIMonth/3), Ceil(FIMonth/3)) AS App_Quarter, // Fiscal Calendar Quarter

  Dual(Text(Date(MonthEnd(SoldDate), 'MMM')), FIMonth) AS App_Month; // Fiscal Calendar Month Name

LOAD *,

  Year(SoldDate) AS Years, // Standard Calendar Year

  Month(SoldDate) AS Months,

   day(SoldDate) as App_Day,

  Date(MonthEnd(SoldDate), 'MMM') AS MonthName,  // Standard Calendar Month Name

  Dual('Q' & Ceil(Month(SoldDate)/3), Ceil(Month(SoldDate)/3)) AS Quarter,  // Standard Calendar Quarter

  Mod(Month(SoldDate) - $(vFiscalYearStartMonth), 12)+1 AS FIMonth,  // Fiscal Calendar Month

  YearName(SoldDate, 0, $(vFiscalYearStartMonth)) AS FIYear,  // Fiscal Calendar Year

  Week(SoldDate, 0, $(vFiscalYearStartMonth)) AS FIYear,

  Week(weekstart(SoldDate)) as WeeFY;

LOAD Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS SoldDate,

  RangeSum(Peek('RowNum'), 1) AS RowNum

AutoGenerate vEndDate - vStartDate + 1;

Thanks..

sunny_talwar

Don't you already have them?

Capture.PNG

nareshthavidishetty
Creator III
Creator III
Author

Hi,

I tried to introduce and seems it is not correct.Please check the below image.

Untitled.png

Thanks..

sunny_talwar

May be look here

Custom Fiscal Calendar

I have not done much with Weeks, so won't be able to offer much help... but may be the attached link can help