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.

11 Replies
simondachstr
Specialist III
Specialist III

Try

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

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

Or even better - upload a sample app with scrambled data.

triciagdaly
Contributor III
Contributor III
Author

Thank you all so much for your help.  Using the Total worked !