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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DEV4
Contributor III
Contributor III

TSORTROW - Null value picked up as max value when sorted desc

Hello All,

I have a scenario where Im sorting a date column where there are two rows of data in which one date value is null and the other has a date value in it. But when I do sort descending talend is picking up null as max value rather than the one which has date in it. Please help me how to handle this scenario.

Below is how my data looks like.0683p000009M6hp.png

My expectation is the second row should be picked up when I do a sort desc on that column but instead null is being picked up.

Below is the job.

0683p000009M6hz.png0683p000009M6i4.png0683p000009M6PX.png

Please help me understand how to handle this scenario.

 

Thank You.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

    The issue is because you are trying to sort a date column as "alpha". Could you please select "date" as the option for sorting and it will work fine.

 

   Please refer the example below for my sample file.

0683p000009M6iE.png

 

0683p000009M6eS.png

 

0683p000009M6iJ.png

 

0683p000009M6iO.png

 

Hope I answered your query 🙂 Please spare a second to mark the topic as resolved. Kudos will be a bonus!

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

 

View solution in original post

3 Replies
Anonymous
Not applicable

Hi,

 

    The issue is because you are trying to sort a date column as "alpha". Could you please select "date" as the option for sorting and it will work fine.

 

   Please refer the example below for my sample file.

0683p000009M6iE.png

 

0683p000009M6eS.png

 

0683p000009M6iJ.png

 

0683p000009M6iO.png

 

Hope I answered your query 🙂 Please spare a second to mark the topic as resolved. Kudos will be a bonus!

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

 

DEV4
Contributor III
Contributor III
Author

Thanks for the reply Nikhil.

I just changed the type to date but Im getting an error 

tSortRow_1_SortOut Bad sort criteria: couldn't sort column "Appl_Submit_Date" as date.

Below is the screenshot of my data and talend job. Not sure where I went wrong. Please suggest. User is giving me the csv file and below is how it looks like.

0683p000009M6iT.png0683p000009M6SD.png

 

DEV4
Contributor III
Contributor III
Author

I missed changing the date format in tmap to the format in file. I changed it and followed your solution and that worked. Thanks again.