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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rank expr explination?

=IF (aggr(rank( sum(Value) ,0) , Value )<= 5 , sum(Value) )

how it is calculating pls explain me step by step?

Labels (1)
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=IF (aggr(rank( sum(Value) ,0) , Value )<= 5 , sum(Value) )


Lets Start From the Inside Function First

SUM(Value)    : Sum of Value

Rank(SUM(Value) ,0) : This will allocate Rank against each SUM(Value)

Aggr(Rank(SUM(Value) ,0)) : This will create a Virtual Table as below format. (Dummy values are given for your understanding)


SUM(Value)   Rank

100                     1

95                       2

80                       3

etc...


Now

IF (aggr(rank( sum(Value) ,0) , Value )<= 5 : will check that which are the lines from above Virtual Table falls (Rank <=5)


Whatever SUM(Value) is having Rank <=5 , will only be displayed...


Let us know if this is still not clear...

View solution in original post

2 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Go through this attached application yo will understand.

Regards

ASHFAQ

MK_QSL
MVP
MVP

=IF (aggr(rank( sum(Value) ,0) , Value )<= 5 , sum(Value) )


Lets Start From the Inside Function First

SUM(Value)    : Sum of Value

Rank(SUM(Value) ,0) : This will allocate Rank against each SUM(Value)

Aggr(Rank(SUM(Value) ,0)) : This will create a Virtual Table as below format. (Dummy values are given for your understanding)


SUM(Value)   Rank

100                     1

95                       2

80                       3

etc...


Now

IF (aggr(rank( sum(Value) ,0) , Value )<= 5 : will check that which are the lines from above Virtual Table falls (Rank <=5)


Whatever SUM(Value) is having Rank <=5 , will only be displayed...


Let us know if this is still not clear...