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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank within Group

Hello

I am trying use Rank to get the rank for the User.

In the following data, if a user selected UserID = 2 then ranking based on Score;

I need to show 2 rows

- first for Study ID 1 with rank 2

- and second for Study ID 2 with rank 1.

How do I accomplish that?

     

User IDFirst NameLast NameStudy IDScore
1ab14
2cd12
3ef11
1ab22
2cd24
3ef22

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe create a straight table chart with 1 dimension and 1 expression

Study ID =Only(Aggr(Rank(Only({1}Score)), [Study ID], [User ID]))
12
21

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe create a straight table chart with 1 dimension and 1 expression

Study ID =Only(Aggr(Rank(Only({1}Score)), [Study ID], [User ID]))
12
21
Not applicable
Author

Thanks Stefan