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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Academic year construction

I have field date in format dd/mm/yyyy; I have date from 01/05/2004 to 30/04/2009 in records; The function Year(date) give me the year value; My problems is my Acadamic year starts from May2004 to April2005; May2005 to April2006 likewise..... How I can have AYear(Acadmicyear), 2004,2005... by selecting the date with above criteria. I am New to qlikview. Thanks

Labels (1)
3 Replies
Not applicable
Author

Hi,

You are saying abt finianacial year rite...?

In that case you should go for yearname() function.

= Yearname(Fieldname,0,5) as Financial_Year

- Sridhar

amars
Specialist
Specialist

Hi,

You will need to creat an alias for that in this way

Load Year(addmonths (DateField,-3)) as financialYear Resident RequiredTable;

The simplest logic for this is that for financial year 2009 the date values are Apr 2009 to Mar 2010 , so to get the proper financial year deduct 3 month's from the datefield & use if with a different alias. Likewise you can use it for your requirement.

See if it helps.

Regards

Amar

Not applicable
Author

IF (NUM(MONTH(ENROLLDATE) ) <5, (YEAR(ENROLLDATE)-1, YEAR(ENROLLDATE)) AS ACDAMICYEAR,

GIVES ACDAMICYEAR FROM MAY 2007 TO APRIL 2008

HAPPY SHARING