Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
izumisawaa
Contributor
Contributor

[resolved] Extract row with the maximum value

hello;
I have a file with 3 colums:
|category|name|upd_date(yyyymmdd)
|=--------+-----+-------=
|1 |foo |20091201
|1 |bar |20100101
|2 |hoge |20091215
category => Group by
upd_date => max(condition)
name => extract
I want to extract the name that has it with the newest upd_date (maximum value) each category(Group by ).
I want to get this result:
|category|name|upd_date
|=--------+-----+-------=
|1 |bar |20100101
|2 |hoge |20091215

Can you help me
Thank you.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello guy
Here I show you an example,
in.csv:

1;foo;20091201
1;bar;20100101
2;hoge;20091215
2;shong;20091214

result:
Starting job forum9360 at 11:28 25/12/2009.
connecting to socket on port 4283
connected
.--+----+--------.
| tLogRow_1 |
|=-+----+-------=|
|id|name|upd_date|
|=-+----+-------=|
|1 |bar |20100101|
|2 |hoge|20091215|
'--+----+--------'
disconnected
Job forum9360 ended at 11:28 25/12/2009.

Best regards

shong

View solution in original post

6 Replies
Anonymous
Not applicable

Hello guy
Here I show you an example,
in.csv:

1;foo;20091201
1;bar;20100101
2;hoge;20091215
2;shong;20091214

result:
Starting job forum9360 at 11:28 25/12/2009.
connecting to socket on port 4283
connected
.--+----+--------.
| tLogRow_1 |
|=-+----+-------=|
|id|name|upd_date|
|=-+----+-------=|
|1 |bar |20100101|
|2 |hoge|20091215|
'--+----+--------'
disconnected
Job forum9360 ended at 11:28 25/12/2009.

Best regards

shong
izumisawaa
Contributor
Contributor
Author

hi Shong
Thank you ;Problem resolved
😃
at tFileInputDelimited_2...
Should I sort (order by upd_date, id) it before the link of tMap(Lookup)?
Anonymous
Not applicable

Hello
Should I sort (by upd_date) it before the link of Lookup?

No, it don't need.
Best regards

shong
Anonymous
Not applicable

Where is the solution?
Got the same problem.
Anonymous
Not applicable

Hi litttledirk 
This topic was a little old, please report a new topic for your problem with details in order to manage and follow up your question more easier.
Thanks!
Shong
Anonymous
Not applicable

My problem is exactly what you describe in post #2 (example and expected result).