Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shanmurugesh
Partner - Contributor II
Partner - Contributor II

how to calculate financial year start date from given date in qlikview

Dear all,

I wabt to calculate financial year start date from given date in qlikview ..can anyone pls tell how to calculate?

Thanks Regards,

Murugesan.N

1 Solution

Accepted Solutions
swuehl
MVP
MVP

What is the definition of your fiscal year? When does it start?

You could probably use Yearstart() or Yearname() functions or similar date functions to assign the fiscal year to your date, add a field to your calendar table:

YearStart( date [, shift = 0 [, first_month_of_year = 1]])

or

YearName(date [, shift = 0 [, first_month_of_year = 1]] )

LOAD

...

Date,

Year(Yearstart(Date, 0, 4)) as FiscalYear,

From ...;

OR use

Yearname(Date, 0, 4) as FiscalYear,

With a different formatting (2011-2012) then before (2011).

In both examples, I used April (first_month_of_year=4) as start of the fiscal year.

Hope this helps,

Stefan

View solution in original post

4 Replies
swuehl
MVP
MVP

What is the definition of your fiscal year? When does it start?

You could probably use Yearstart() or Yearname() functions or similar date functions to assign the fiscal year to your date, add a field to your calendar table:

YearStart( date [, shift = 0 [, first_month_of_year = 1]])

or

YearName(date [, shift = 0 [, first_month_of_year = 1]] )

LOAD

...

Date,

Year(Yearstart(Date, 0, 4)) as FiscalYear,

From ...;

OR use

Yearname(Date, 0, 4) as FiscalYear,

With a different formatting (2011-2012) then before (2011).

In both examples, I used April (first_month_of_year=4) as start of the fiscal year.

Hope this helps,

Stefan

shanmurugesh
Partner - Contributor II
Partner - Contributor II
Author

Hi,

yes..its is working..

Thanks

Murugesan.N.

Not applicable

Thank you so much. This is really helpful.

usamabinsadiq
Contributor III
Contributor III

Thank you, it was helpful.

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.