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: 
sonikajain
Partner - Contributor
Partner - Contributor

help needed on expression

Dear all,I need to do a calculation on columns Division and Balance , such that - " for Divisions sorted on sum(balance), the sum of balance for top 5 divisions."

Am using the expression -sum({<DIVISION = {"=rank(aggr(sum(BALANCE),DIVISION))<= 6)"}>}BALANCE), but it seems to fail as the rank function returns a number, and I need the Divisions for top 5 ranks.

Please help me on this expression.

2 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Maybe shift the Aggr() and Rank() into the dimensions and then just have Sum(BALANCE) in the expression?

sonikajain
Partner - Contributor
Partner - Contributor
Author

I need this in expression only...:(