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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filter the Most Recent Records

I have an output from the component tParseRecordSet which has 5 columns, let's say A, B, C, D, E.

 

Column E is the updated time of each record.

 

Now I want to get the most update D for each group (group by A, B)

 

Question: what component should I use to achieve this? Because the data is not in the database, I can't directly use SQL statements to do it.

 

Any help is greatly appreciated. Thanks!

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi FFUL
On tParseRecordSet, define D column as Date type, and set its pattern as "yyyy-MM-dd HH:mm:ss.S".

Regards
Shong

View solution in original post

7 Replies
TRF
Champion II
Champion II

You should use tAggregateRow, group by fields A and B, then function Max o' field D.
Anonymous
Not applicable
Author

Thanks for your reply. I tried same way as you said... The following is the error message:

 

Unparseable date: "2017-04-03 21:08:37.0"
Unparseable date: "2017-03-29 10:20:20.0"
Unparseable date: "2017-04-03 21:08:37.0"
Unparseable date: "2017-03-29 10:20:20.0"
Unparseable date: "2017-04-03 21:08:37.0"
Unparseable date: "2017-03-29 10:20:20.0"

 

 

TRF
Champion II
Champion II

What is the datatype?
Anonymous
Not applicable
Author

The datatype of Field D in my case is timestamp, but as it's from the previous component tParseRecordSet, so typr of field D in tParseRecordSet is Object. Thanks!

TRF
Champion II
Champion II

OK, so you need 1st to convert as date or string (as soon as the format starts with year, alphabetic order is also possible).
Anonymous
Not applicable
Author

just convert it in the schema or I need to add another component?

Anonymous
Not applicable
Author

Hi FFUL
On tParseRecordSet, define D column as Date type, and set its pattern as "yyyy-MM-dd HH:mm:ss.S".

Regards
Shong