Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

firstSortedValue NULL

Hi there,

I'm using firstSortedValue but it doesn't work because some of my data has the same "order" and so it returns me null.

Is there a way to "emulate" firstSortedValue with data havaing the same order ? So instead of returning null it'll return the first result of the set.

Thx.

15 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you want to display just the max score for each student? In that case, use

=max(Score)

Am I understanding your requirement?

-Rob

Not applicable
Author

No.

For my example: there are 3 students. I want those 3 students sorted by thier Score value.

If you implement that with FirstSortedValue without DISTINCT you won't get anything as a result.

If you implement that with DISTINCT you get only two different records.

So I need to avoid described situations, becuase we definitely will have identical scores for students and I don't to loose any of them and more over I want to work at all.

Remember how sorting works in MySQL for instance. You have a table with 3 records. You sort this table and you get all 3 records even if there identical values in those records.

Does it make any sense?:)

prieper
Master II
Master II

Did you check on the ORDER BY-statement?

Peter

Not applicable
Author

AFAIK Order By statement is suitable for a script, not for expression.

And I need to provide sorting functionality at runtime, when script has already been run, that means in expression.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about sorting the column by expression?

Not applicable
Author

The thing is I need to sort the collection of data, not the table object by it column.

Basically what I want: There is a collection with 3 items, I need to sort it with qlikview and return the result one record at a time, just like a FirstSortedValue has a third parameter, which indicates the index inside the sorted collection.