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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get updated date through tMap

Hi,

 

Can you please advise me how to get the highlighted data through tMap coding?

For the same PO, the source report contains multiple records. the highlighted one is the latest one which I need for the result.

For now I do not have any idea to achieve this.

 

Thanks for the help!

 

0683p000009M1uS.jpg

Labels (2)
4 Replies
akumar2301
Specialist II
Specialist II

you could you tsort before going to tmap so that latest is at top , then if you doing lookup innerjoin user first match
vapukov
Master II
Master II

better to use tAggregateRow

 

of course you can store data to tHashOutput and then use in tMap for join with all data (if you need this)

Anonymous
Not applicable
Author

Hi,

 

Thank you for the reply. I have tried using tSortRow to DESC the date. But then I got reverse dates.  

The flow I created is below as well - not sure which part has problem. tMap_1 is used to transfer "String" to "Date" data type. Then I sorted both ETD and ETA DESC. the second tMap is used to do the logic for my task.
0683p000009Lz3c.jpg

0683p000009M1sD.jpg

akumar2301
Specialist II
Specialist II

Hello ,

 

I took below as input 

 

2/19/2019;2/21/2019;A
2/05/2019;3/21/2019;A
2/19/2019;3/21/2019;A
2/19/2019;2/21/2019;B
2/05/2019;3/21/2019;B
2/19/2019;3/21/2019;B

 

read file (while reading you could read it as Date with pattern MM/dd/yyyy) --> tsort (on 2nd col desc then 1st col desc then 3rd col) --> tsamplerow ( for test -to get 1st 2 record) --> tLogrow

0683p000009M21e.jpg

 

i got this as output

2/19/2019;3/21/2019;A

2/19/2019;3/21/2019;B

 

But if you are not doing any lookup in tMap( 3rd column) after tsortRow , better to go with tAggregateRow/tAggregateSortedRow.