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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
milindnikumbh
Creator
Creator

Rank Function with variable

Dear Experts ,

I am not able to use the variable in rank expression .

I want to search the top 5 ranks in date which is less than or equal to  vdt ( date passed ).

=aggr(if(Rank(Sum(qty))<=5,qty ),  (pdate<=vdt)  )  

=aggr(if(Rank(Sum(qty))<=5,qty ),  pdate  ) is working fine but I am not able to restrict the pdate .

Pleas suggest.

Thanks.

Best Regards,

Milind. 

2 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

Please, see the attachement. Is this what you want to get?

rank_aggr.png

milindnikumbh
Creator
Creator
Author

Thanks. Very helpful . My issue is resolved using this expression.