Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
flo2
Contributor III
Contributor III

Inconsistency with use of firstsortedValue || qvw example integrated

EDIT 2 :

Ah, i just didn't read enough about the function firstsortedvalue

"

  If the word DISTINCT occurs before the function arguments, duplicates resulting from the evaluation of the function arguments are disregarded.

 

I don't undestand what is the goal of the function without distinct so.

Because, in case, now, i will always put distinct for security in case of duplicates.

 

Hello,

i had the exact same problem that this person had :

https://community.qlik.com/t5/QlikView-App-Dev/First-Sorted-Value-returning-NULL/td-p/1035637

I had this kind of field :

FirstSortedValue([ registration number],-[Date]) as [Identification].

It works for majority of the data but for some of cases, the firstsortedvalue return a null value ( but it is very weird that it returns nulls because for those problematic cases i have only one registrationNumber [ there are no duplicates for the ones who returns null, so it should return just the only one  ] But, it returns null.

Then, thanks to the response on the post, i have put distinct and it works perfectly. 

But i don't understand because there is only one element , no duplicates so why it doesn't even return the only one ?

If it is not a known problem i will insert as attachment a simplificate version of the qlik if someone can help, because i really don't understand why...

 

 

 

Also, is it better to always put distinct when it is useful to use firstsorterdvalue ?

 

thanks for reading,

 

have a nice day

Labels (4)
0 Replies