Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Column having months and year extract most recent one

I've a column containing months and year like Jan 2015, Feb 2015.....August 2016 and now I want the latest month ie Aug 2016? New to qlikview please help

5 Replies
Gysbert_Wassenaar

Can you post a small qlikview document with some example data that explains what you're trying to do?


talk is cheap, supply exceeds demand
johnw
Champion III
Champion III

I feel I might be missing something, but to get the maximum of a numeric (e.g., date) field, you just use max(), so...

max(MyMonth)

Perhaps you have an issue like you've defined your month as a text field. Don't! Make it a date. For instance, date(monthstart(MyDate),'MMM YYYY') as MyMonth.

Anonymous
Not applicable
Author

Hi Shilpi,

YTD ,MTD values display values like year to date or month to date in Qlikview.

Use

Date(Monthstart(Datecoumn),'MMM YYYY') as LatestMonth;

Max(DateCoumn) also return resent value.

Regards

Pavan

Anonymous
Not applicable
Author

Hi John, thanks a lot..it was helpful..Also I've my data as 'Q1 2014' in a text field how do I make it in date format  containing quarter and year?

johnw
Champion III
Champion III

Unfortunately, there are no formatting codes for the quarter, so you need to format it with dual(). Something like this:

dual('Q'&ceil(month(Date)/3)&' '&year(Date),quarterstart(Date)) as Quarter