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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
triciagdaly
Contributor III
Contributor III

Ranking issue

I am trying to rank the PPV with the 10 least and 10 greatest entries for item.  I tried using the following in the expression for the EXT Variance Amt / PPV value, and it returned 1 for all rows.

if(rank( -([Ext Variance Amt / PPV]), 0, 1)<=10, Red(),
if(rank( ([Ext Variance Amt / PPV]), 0, 1)<=10, Green()
))

See the attached screen shot also.

1 Solution

Accepted Solutions
Not applicable

or use

if(rank(TOTAL  -[Ext Variance Amt / PPV], 0, 1)<=10, Red(),
if(rank(TOTAL 
[Ext Variance Amt / PPV], 0, 1)<=10, Green()
))

View solution in original post

11 Replies
rubenmarin

Hi Tricia, you tried with rank(TOTAL ... )? I can be more helpful with a sample data

agomes1971
Specialist II
Specialist II

Hi,

Tricia,

please see my attached file its just an example i hope it helps.

Regards

André Gomes

triciagdaly
Contributor III
Contributor III
Author

Andre,

Not very helpful as I'm not wanting to use a button to show the ranking.  Thanks!

Not applicable

Attached is a simple example on how to do it using 'Visual Cues' dynamically.

Hope it helps.

simondachstr
Specialist III
Specialist III

You'll need to do an aggregation on the ranks. Every item will be regarded in isolation on a row basis which will always result to rank=1.

triciagdaly
Contributor III
Contributor III
Author

I'm having syntax issues using aggr(rank....

The below works with one dimension but I have multiple.

if(rank( -[Ext Variance Amt / PPV], 0, 1)<=10, Red(),
if(rank(
[Ext Variance Amt / PPV], 0, 1)<=10, Green()
))

Help with syntax is appreciated.

triciagdaly
Contributor III
Contributor III
Author

Note:  The above expression is defined as text color for the expression 'Ext Variance Amt / PPV' field.

Not applicable

Add mode 4 instead of 1.  0,4 instead of 0,1

Not applicable

or use

if(rank(TOTAL  -[Ext Variance Amt / PPV], 0, 1)<=10, Red(),
if(rank(TOTAL 
[Ext Variance Amt / PPV], 0, 1)<=10, Green()
))