Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ibobob70
Contributor II
Contributor II

Usage of FirstSortedValue()

Hi all

I'm trying to use the function FirstSortedValue() to find the first value according to three columns. The ID column, the Date column and the the Name column. Could somebody helps me? thanks in advance for your help :). see the dataset .

Labels (1)
3 Replies
BrunPierre
Partner - Master
Partner - Master

@Ibobob70 Could you share the desired output?

Or
MVP
MVP

Since FirstSortedValue takes a single sort_weight parameter, I believe you'd need to turn those three fields into one somehow:

1) In script by loading them in sorted order and adding a row number or autonumber field for sorting later

2) By concatenating them as a string (note - this will result in string based sorting rather than numeric)

3) By converting the Name column into a numeric value and adding the values up, e.g.

(ID * 10000000) + (Date*100) + ord(Name) // Note - this assumes Name is a single letter

Ibobob70
Contributor II
Contributor II
Author

Thank you for your help 🙂 i'll try it.