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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
MZqlik
Contributor III
Contributor III

How to find latest year from 'YY/YY' format

Hi Everyone.
I have a field "financial year" which is in the following format: 21/22, 22/23 ('YY/YY').
I want to create a variable which identifies which one is the latest year (max) so that every year I don't have to update it manually. Does anybody have a clue if this can be done in this format or shall I covert the date format from the source data?
Thank you

Year field is literally:

'21/22'

'22/23'

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

MaxString([Financial Year]) should work here. If your max year in the example above is '23', use Right(MaxString([Financial Year]),2).

View solution in original post

6 Replies
MZqlik
Contributor III
Contributor III
Author

Hi Everyone.
I have a field "financial year" which is in the following format: 21/22, 22/23 ('YY/YY').
I want to create a variable which identifies which one is the latest year (max) so that every year I don't have to update it manually. Does anybody have a clue if this can be done in this format or shall I covert the date format from the source data?
Thank you

sidhiq91
Specialist II
Specialist II

@MZqlik  Could you please provide us the sample data so that we can help you out?

MZqlik
Contributor III
Contributor III
Author

I don't think there is much to share to be honest.

Year field is literally:

'21/22'

'22/23'

I would like to identify the latest with the set analysis. 

MZqlik
Contributor III
Contributor III
Author

Apologies I meant to post this into Qlik Sense. I have just done it, feel free to remove this post. 

Or
MVP
MVP

MaxString([Financial Year]) should work here. If your max year in the example above is '23', use Right(MaxString([Financial Year]),2).

MZqlik
Contributor III
Contributor III
Author

Perfect that does the job. Thank you!