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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fiscal year from Calendar Year

Hi all,

I have the date field starting

date (MM/DD/YYYY) Fiscal(MM/DD/YYYY)

07/01/2006 01/01/2007

08/01/2006 02/01/2007

09/01/2006 03/01/2007

.

.

.

I need to calculate the fiscal period nd month as shown above....

4 Replies
Not applicable
Author

Hi

With the help of yearname() function you make fisnal year.

yearname(date,0,4) as Fin_Fear

Started with Apr-1 and end with Mar-31

Regards

Ashish Srivastava

Not applicable
Author

i need the output as shown in the fiscal column,

also i want to calculate the financial month No.

that is 07/01/2006 the financial year should be come as 2007 and FinMonth is 01.

Not applicable
Author

then you make this script

Year(Yearname(date,0,4)) as Fin_Year

Regards

Ashish

Not applicable
Author

Hi Gopinath,

Please use the below script to get expected result.

LET vFiscalMonthOffset = 6;

TempDate:

LOAD * INLINE

[TempDate

07/01/2006

08/01/2006

09/01/2006

];

LOAD DATE(TempDate) AS Date,

AddMonths(DATE(TempDate), $(vFiscalMonthOffset)) AS [Fiscal Date],

Year(Date(TempDate)) AS Year,

Subfield(YearName(Date(TempDate), 1, $(vFiscalMonthOffset)),'-',1) AS [Fiscal Year]

Resident TempDate;

DROP TABLE TempDate;



Please let me know for any further concern in this regard.