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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank() from two dimension Aggr()

Dear All,

Please let me know how can get the Rank() from two Dimension Table ( via Aggr() function)

i want to get the Member rank of a specific city like 'MUMBAI'

RANK(aggr(Sum(TRADE_VALUE),CITY,MEMBERID))

Kindly help

12 Replies
Not applicable
Author

All City Returning 1

swuehl
MVP
MVP

Well, I have loaded your above table, created a straight table with Dimension CITY and as expression

= Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER))

then selected Member A:

CITY = Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER)) sum("TOTAL")
2 350
DELHI2200
MUMBAI2100
PUNE250
KOLKATA 0

Select B:

CITY = Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER)) sum("TOTAL")
1 650
KOLKATA1100
MUMBAI1200
PUNE1250
DELHI3100

Select C:

CITY = Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER)) sum("TOTAL")
1 550
DELHI1500
MUMBAI350
KOLKATA 0
PUNE 0

Looks to me like what you requested. Have you even tried?

Not applicable
Author

Thanks a lot .

its working fine as per requirement,