Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What does the Rank() function do?

Hi all,

I am trying to understand what the rank function does but I am not entirely sure how it works.

Does anyone have a simple illustrated example of how it works and what it returns?

Reading the Help in QlikView it seems that the function returns the position of a value in a given table. I tried testing it but I couldn't get it to work to confirm my understanding.

Any help would be great

1 Reply
richard_chilvers
Specialist
Specialist

The rank function will identify the place a row has in a table based on the field you specify.

I have a current example of a call centre where we rank each member in the team according to the value of the sales they make in a month.

By making the rank the primary sort field we get:

Rank Name Sales

1 Richard Jones £200,000

2 Richard Smith £180,000

3 Richard Name £150,000

This is a simple example where the rank expression is simply RANK(Sales).

Hope this isn't too simple and helps.

Regards