Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find LogFile latest data

Hi Folks,

i am going to create a dash board with log files, but in the below image it was showing 5 records for Japan.

How to find the latest one, can you help some one..

@Sub2u

15 Replies
MayilVahanan

Hi

Try like this

LOad *, Timestamp(Timestamp#(Left(Replace(Text(Timestamp), 'T', ''),14),'YYYYMMDDHHmmSS'),'DD/MM/YYYY HH:mm:SS TT') as Time

inline [

Timestamp

20160223T150028.306-0800

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi,


Please find the below image.

Japan.PNG

Regards,

SubbaReddy.

MayilVahanan

Hi

Below script also not working?

Load *, Timestamp(Timestamp#(Left(Replace(Text(Timestamp), 'T', ''),14),'YYYYMMDDHHmmSS'),'DD/MM/YYYY HH:mm:SS TT') as Time

inline [

Timestamp

20160223T150028.306-0800

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

It is working fine. whats the issue? What value you are getting and what you want.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

I want to show only last record of Japan...

@SubbaReddy.

Not applicable
Author

Subbareddy, first convert the field values into new timestamp field. After that use the group by function on the key filed and Inner join on the Key and maximum time stamp.

Source:

LOAD

     *,

     Timestamp(Timestamp#(Replace(subfield(text(timestamp_field),'.',1),'T',' '),'YYYYMMDD hhmmss')) as new_timestamp

From source;

InnerJoin(Source)

LOAD

     keyfield,

     max(new_timestamp) as new_timestamp

resident Source

group by keyfield;