Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

What's the difference in use between Rank in UI and Rank in Script

Hi All,

Please what are the differences in use of rank function in UI and Script.

Thank & Regards

Neetha

8 Replies
swuehl
MVP
MVP

One big difference: There is no rank() function in the script.

Anonymous
Not applicable
Author

Hi Swuehl,

Thanks for quick response.

Sorry , wrongly worded question.

Not function.

i want to know the difference for ranking in script and in UI.

Kushal_Chawda

In script there is no special function to create Rank like we have in front end.

In script we can define rank by writing some logic with use of autonumber

Kushal_Chawda

In Script you cannot create dynamic ranking, but on front end you can

Anonymous
Not applicable
Author

Thanks kush,what is the use for ranking in script,when you have rowno() and recno()

Kushal_Chawda

That all depends on requirement. rowno() and recno() are the functions specific to each record of the record set which will not be useful in ranking (It is useful when you want to Rank based on Primary key). So for creating the ranking in script you required to use the functions like peek, autonumber with group by & order by.

Here are some examples

https://community.qlik.com/thread/8689

https://community.qlik.com/thread/149145

Anonymous
Not applicable
Author

If possible can you give real time example as where it is used

hugmarcel
Specialist
Specialist

Hi

see my example file rank.qvw.

- it contains a sub providing flexible ranking mechanisms,
  such as ranking by autonumber or by row().
- ranks can be split into half ranks for identical values
  (e.g. rank 11,12,13 -> 12, 12, 12)

https://community.qlik.com/docs/DOC-13949


Regards - Marcel