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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

firstsortedvalue value date descending number ascending

I have a table with for example an employeename, dates, and sales_per_customer

Now I want to find for every employee, the highest date and within that date the lowest sales_per_customer.

So I tried firstsortedvalue(employeename, -date, sales_per_customer) but apparently only one sort_weight is allowed ?

So is there another way to achieve this, without having to create a lot of temporary tables 🙂

 

 

1 Solution

Accepted Solutions
curiousfellow
Specialist
Specialist
Author

I made a simple example, in real life my second field is a string. Perhaps I can do something with the lenght of the string.

Thank you for giving a direction

View solution in original post

3 Replies
sunny_talwar

May be this

FirstSortedValue(employeename, -date + (sales_per_customer/1E10))
curiousfellow
Specialist
Specialist
Author

I made a simple example, in real life my second field is a string. Perhaps I can do something with the lenght of the string.

Thank you for giving a direction

sunny_talwar

You can do length or rank of string....