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: 
rustyfishbones
Master II
Master II

Firstsortedvalue

Hi All,

I have the following expression that should return the name of the Bowler with the most wickets taken, however 2 Bowlers have the same amount, how can I show both names as the shared top Wicket taker

='Leading Wkt Taker '& chr(13) &

FirstSortedValue(Bowler,-Aggr(SUM(Wickets),Bowler))

& ' ' & MAX(AGGR(SUM(Wickets),Bowler))

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Maybe:

concat({<Bowler = {'=rank(sum(Wickets))=1'}>}distinct Bowler, ',')

Hope this helps!

View solution in original post

7 Replies
marcus_sommer

Maybe you could integrate rank() or/and concat() in your firstsortedvalue-expression.

- Marcus

Not applicable

You may need to add nodistinct to your aggr functions. Aggr(nodistinct SUM(Wickets),Bowler))

rustyfishbones
Master II
Master II
Author

I tried that, no luck....

tresesco
MVP
MVP

Load * Inline [

Dim, Amt

A, 100

B, 100

C, 99

D, 98]

=FirstSortedValue( Aggr(Concat(Dim,','),Amt),-Aggr(Amt,Amt))

Gives - A,B

rustyfishbones
Master II
Master II
Author

Tried it with Rank and Concat, but I could not get it working

jerem1234
Specialist II
Specialist II

Maybe:

concat({<Bowler = {'=rank(sum(Wickets))=1'}>}distinct Bowler, ',')

Hope this helps!

rustyfishbones
Master II
Master II
Author

Thanks this worked!