Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I've a set analysis that selects the maximum "Gewicht" and returns the corresponding "Istwert" value.
My problem is the following : it works only when the max "Gewicht" is unique. In the case where my selection is filtered and the are multiple "Gewicht" with the same value, it simply returns the sum of all the "Istwert" values.
I would like to add a second criteria: return the "Istwert" where the Ziel_ID is minimal. In this case it sould return -0.09.
I've looked at this post, I think the problematic should be the same but I couldn't get this working:
http://community.qlik.com/message/186214#186214
Can you help me ? Thank you very much!
try maybe
=FirstSortedValue( {$<[Gewicht]={'$(=max([Gewicht], 1))'}>} Istwert, Ziel_ID)
try maybe
=FirstSortedValue( {$<[Gewicht]={'$(=max([Gewicht], 1))'}>} Istwert, Ziel_ID)
Thats perfect!
And I can also add a parameter to choose if I want the first, the second, the third... sorted value:
=FirstSortedValue( {$<[Gewicht]={'$(=max([Gewicht], 1))'}>} Istwert, Ziel_ID,3)
Thank you !
Hi,
I have posted two video tutorials about FirstSortedValue. I thought you might be interested to watch.
Happy learning!
Cheers,
DV