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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gireesh1216
Creator III
Creator III

Latest Comment data from Comments Field

Hello Team,

I have a table like below. In comments field we are looking latest date comments. How to achieve this?

RAW DATA:

IDComments
1

<Gireesh> 10/30/2018 hello guys.

<Suri> 10/25/2018 hello pa

<nari> 10/23/2018 just started

2

<Suri> 10/25/2018 Start

<nari>09/15/2018 end

3

<babu> 10/30/2018  Table Format'''''''''''''''''''''''''''''''''''123''''''''''''''''''''''

<nari>   9/10/2018  start

OUTPUT: (Looking only latest date comments)

IDComments
1<Gireesh> 10/30/2018 hello guys.
2<Suri> 10/25/2018 Start
3babu> 10/30/2018  Table Format'''''''''''''''''''''''''''''''''''123''''''''''''''''''''''
2 Replies
dsharmaqv
Creator III
Creator III

try this if very 1st line will always shows the latest comments.

LOAD ID,
Comments,
SubField(Comments,'<',2) as Cmt
FROM
[https://community.qlik.com/thread/318279]
(
html, codepage is 1252, embedded labels, table is @1);

gireesh1216
Creator III
Creator III
Author

Hello Sharma,

Below expression working fine.

=Subfield(Comments,chr(10),1)

Thanks for your replay