Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to create FY Year from Date?
Hi!
There is no single way to make a FY since all companies can have a different FY. If company's FY starts in 1.7 then you could use structure like this:
// Variables to set YTD and MTD
SET FiscalFirstMonth = 7; // First month of actual fiscal year
LET FiscalDev = $(FiscalFirstMonth)-1; // Fiscal calendar deviation
Calendar:
Load *,
Num(Month(Addmonths(Date,$(FiscalDev))),00) as [Fiscal Month No], |
Dual('Q'&Num(Ceil(Num(Month(Addmonths(Date,$(FiscalDev))))/3)),Num(Ceil(NUM(Month(Addmonths(Date,$(FiscalDev))))/3),00)) as [Fiscal Quarter],
and so on.
Br,
Miikka
Hi,
If want to show only Financial Year
Like 2013-2014
Then use YearName(Date,0,4)
Regards
Hi Adhya,
Suppose your FY starts from Apr then use below in script .
Calender :
Load
Date,
IF(MONTH(Date)>= 4, YEAR(Date)+1, YEAR(Date)) as FY
Resident Data;
I would personally build the calendar outside of Qlik view and load rather than try to derive it.
Fiscal Years differ from customer to customer but once set rarely change (Acquistiion/takeovers etc...)
so why make Qlik work on deriving the value for each transaction with a date in it when you can link to a reference table which will have 12 records added a year.
Hi Abhay
You can use QV function Yearname
like
yearname('2001-10-19',0,4)
will give 2001-2002 in FY format.
where 4 is the starting month
Regarding
Kushal Thakral