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: 
Sri4
Contributor II
Contributor II

Rank group wise values for multiple dimension in straight table

I have data , I want rank each dimension by group the values .

abcd:
Load *
Inline [

Name,City,State
Ab,Hyd,Ts
Ab,Hyd,Ts
Ab,Mum,Mh
Cd,Mum,Mh
Cd,Mum,Mh
Xy,Kol,Bg
];

I got output

Name Rank for Name City City rank
Ab 1 Hyd 1-2
Ab - Hyd 1-2
Ab - Mum 1
Cd 1 Mum 1
Cd - Mum 1-2
Xy 1 Kol  
       

 

Expecting output:

Name Rank for Name City Rank for City State Rank for State
Ab 1 Hyd 1 Ts 1
Ab - Hyd - Ts -
Ab - Mum 1 Mh 1
Cd 1 Mum                            1 Mh 1
Cd - Mum   Mh -
Xy 1 Kol 1 Wg 1
           

 

Labels (1)
1 Solution

Accepted Solutions
FrankG
Partner - Contributor II
Partner - Contributor II

You can try this:

Add this to the loadscript:
Load *, rowno() as row

And for the ranking expressions:
aggr(rank(-row), Name, row)
aggr(rank(-row), Name, City, row)
aggr(rank(-row), Name, City, State, row)


 

 

View solution in original post

1 Reply
FrankG
Partner - Contributor II
Partner - Contributor II

You can try this:

Add this to the loadscript:
Load *, rowno() as row

And for the ranking expressions:
aggr(rank(-row), Name, row)
aggr(rank(-row), Name, City, row)
aggr(rank(-row), Name, City, State, row)