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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
karolina_
Creator II
Creator II

rank() not showing correct top projects

Hi All,

I have a problem with rank, which seems to take wrong projects as top projects

Expression NPV is

$(eFinancial([Financial NPV]))  (which is sum with set analysis)

Dimension is

aggr(If(rank($(eFinancial([Financial NPV])))<=10,[Project Name]),[Project Name]))

[the same result: if(aggr(rank($(eNoParent4Financial([Financial NPV]))),[Project Name]) <= 10, [.Project Name])

So when I use 'suppress when value is null' for dimension it actually does not show 10 top projects per NPV

Any help appreciate

Message was edited by: Karolina Papaj

4 Replies
tresesco
MVP
MVP

This is possibly because there are multiple [Project Names] with same ranking. You might have to use optional parameters like:

Rank( Expression, 0, 1

See help for better understanding.

Not applicable

could you please attach a sample qvw please ?

karolina_
Creator II
Creator II
Author

This does not help

karolina_
Creator II
Creator II
Author

I wanted to prepare document for update but when i do 'keep possible values' to reduce the amount of data, names appear correctly 😕
They do not appear when i have those selections done.
When no selections are done and I choose eaither name or id that is show as missing above, it is shown as the only record, so name is not duplicated

As i have 2 dimensions Id and Name, I tried (or other variations of Name and ID) but with no result
if(aggr(rank($(Financial([Financial NPV))),[Name],[ID]) <= 10, [Name], 'Others')

Promoting Id over Name and putting there aggr&rank has similar result