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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank function

Hi,

I have a following table:

ID,Subject,Marks

1,English,20

1,English,25

1,Hindi,30

1,Hindi,35

2,English,50

2,English,35

2,Hindi,60

2,Hindi,55

3,English,45

3,English,50

3,Hindi,36

3,Hindi,46

I want to calculate rank of Average Marks for ID 1/2/3 (to be given via user input) for each of the subjects. That is, my qvw file will have following straight table:

(For ID 1)

Subject - Rank

English - 3

Hindi - 3

I am attaching a qvw file - I need the correct expression in "To be Evaluated" table.

10 Replies
Not applicable
Author

Hi Balaji,

See attached application. It displays based on variable or based on field selection on ID.

Two options yields the same result and gives your desired result.

Basically you need an expression like below:

        Avg(Aggr(rank(Avg( {$ <ID = > } Marks) ), ID, Subject))

Best,

Ersen