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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select the minimum value based on 2 dimensions (set analysis)

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!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

try maybe

=FirstSortedValue( {$<[Gewicht]={'$(=max([Gewicht], 1))'}>} Istwert, Ziel_ID)

View solution in original post

3 Replies
swuehl
MVP
MVP

try maybe

=FirstSortedValue( {$<[Gewicht]={'$(=max([Gewicht], 1))'}>} Istwert, Ziel_ID)

Not applicable
Author

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 !


IAMDV
Master II
Master II

Hi,

I have posted two video tutorials about FirstSortedValue. I thought you might be interested to watch.

http://qlikshare.com/

Happy learning!

Cheers,

DV