Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to achieve the Latest year and month in loaded data

Hi Friends,As new to QlikView as it may simple myself not aware of things like Date in QV can any one help on below thing:

ModifiedDate having modified time stamp need to display max(ModifiedDate) in Jan 2015(MMM YYYY)

ModifiedDate
201501
201501
201501

How can we achieve this in a text object?

Tried below expression in Text Object

=date#(Max({1}[ModifiedDate],'MMMYYYY'))

Output Getting is:201501 but this is not expected

Expecting Output is: Jan 2015

10 Replies
PrashantSangle

Hi,

Try

date(date#(ModifiedDate,'YYYYMM'),'MMM YYYY')

or

date(ModifiedDate'MMM YYYY')

Or

try with simply MonthNAme(ModifiedDate)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

No luck tried with all above solutions not getting desired o/P

arulsettu
Master III
Master III

check this in textbox

=date(date#('201501','YYYYMM'),'MMM YYYY')

PrashantSangle

Hi,

Can you post sample file?

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
senpradip007
Specialist III
Specialist III

You should get your desired result by using

date(date#(ModifiedDate,'YYYYMM'),'MMM YYYY')

expressions as suggested by max dreamer.

Could you please upload sample qvw?

Not applicable
Author

Hi Sruthi,

Try this.

Date(Date#(201501,'YYYYMM'),'MMM YYYY')

Not applicable
Author

Hi Sruthi,

=max(date(date#(ModifiedDate,'YYYYMM'),'MMM YYYY'))

try this

Regards,

Savi

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

MakeDate(Left(DateFieldName, 4), Right(DateFieldName))AS Date_Formatted

FROM DataSource;

Now use =Date(Max({1}[Date_Formatted]),'MMM YYYY')


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Thanks for valuable Time Savitha,Jagan yours code worked for me