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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Expression Help

Hi All,

My Calendar contain

Fiscal Year

2011-2012,

2012-2013,

2013-2014,

2014-2015

i want the output like

11-12

12-13,

13-14

14-15

evaluating FY by yearname(Date,0,4) as F_Year.

How i can do this??

Thanks

Abhay

1 Solution

Accepted Solutions
svenkita
Creator II
Creator II

in the script where the fiscal year is generated you can add the following

Left Join
Load [Fiscal Year],

         Mid([Fiscal Year],3,2) & '-' & Mid([Fiscal Year],8,2) as FormatedFiscalYear

Resident <TableName>

View solution in original post

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

This should do it:

Replace(YearName(Date, 0, 4), '20', '') as F_Year

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
abhaysingh
Specialist II
Specialist II
Author

Hi Janathan,

What if My data contain 1999-2000, than in that case it will become harcoded..

thanks

abhay

svenkita
Creator II
Creator II

in the script where the fiscal year is generated you can add the following

Left Join
Load [Fiscal Year],

         Mid([Fiscal Year],3,2) & '-' & Mid([Fiscal Year],8,2) as FormatedFiscalYear

Resident <TableName>

qlikmsg4u
Specialist
Specialist

Hi Try this

load *,Right(SubField([Fiscal Year],'-',1),2)&'-'&Right(SubField([Fiscal Year],'-',2),2) as [New Fiscal Year];

load * inline [

Fiscal Year

2011-2012

2012-2013

2013-2014

2014-2015

]

jsingh71
Partner - Specialist
Partner - Specialist

Use This:

 

Right(SubField([Fiscal Year],'-',1),2) & '-' & Right(SubField([Fiscal Year],'-',2),2)

Not applicable

Try this. Considering only four digit years.

=Mid(YearName(Date,0,4),3,3)&Right(YearName(Date,0,4),2)

Regards,

KKR