Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Sxbbb
Creator III
Creator III

Sort A-Z from two flied simultaneously.

Want to sort WorkOrder &'-'& SampleNo
SampleNo from ascending

 

Now SampleNo is not sorted ascending.

Sxbbb_0-1676520803610.png

Sxbbb_1-1676520826208.png

I want to sort SampleNo in every WorkOrder.

 

like this

Sxbbb_2-1676520907679.png

 

 
7 Replies
marcus_sommer

By concatenating the fields the sample-no isn't a numeric anymore else a string-part and sorted in this way. You may get your wanted sort-order by adding extra zero's, maybe like:

field1 & num(field2, '00')

Sxbbb
Creator III
Creator III
Author

It got results like this. 

Sxbbb_0-1676858368586.pngSxbbb_1-1676858407160.png

Still not the way you want
marcus_sommer

I meant to apply the adjusted concatenation within the dimension and not as sort-expression which couldn't work in this way because it creates a string and nothing what could be numerically evaluated. If you want to keep it as sort-expression you need extend the approach, maybe with: maxstring().

Sxbbb
Creator III
Creator III
Author

I used Code 

Sxbbb_0-1676949279006.png

SampleNo from ascending
Sxbbb
Creator III
Creator III
Author

Sxbbb
Creator III
Creator III
Author

How do I fix it so that it's in ascending order?
marcus_sommer

Just follow the suggestions from above!

Beside this I recommend to transfer most of the logic into the script to avoid any challenges with calculated dimensions.