Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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
 
					
				
		
All City Returning 1
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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 | |
| DELHI | 2 | 200 | 
| MUMBAI | 2 | 100 | 
| PUNE | 2 | 50 | 
| KOLKATA | 0 | 
Select B:
| CITY | = Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER)) | sum("TOTAL") | 
|---|---|---|
| 1 | 650 | |
| KOLKATA | 1 | 100 | 
| MUMBAI | 1 | 200 | 
| PUNE | 1 | 250 | 
| DELHI | 3 | 100 | 
Select C:
| CITY | = Min( aggr( Rank(Sum({1} "TOTAL")), CITY, MEMBER)) | sum("TOTAL") | 
|---|---|---|
| 1 | 550 | |
| DELHI | 1 | 500 | 
| MUMBAI | 3 | 50 | 
| KOLKATA | 0 | |
| PUNE | 0 | 
Looks to me like what you requested. Have you even tried?
 
					
				
		
Thanks a lot .
its working fine as per requirement,
