Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Rank in table

Hi ,

I am facing an issue in rank function. Scenario is I need to create a table where there are multiple dim and measure and one rank column.

Serial No working as a primary key, Gateway is a dim and rest are measures:

      

S.NOGatewayTotal SaleTotal WaybillActual WeightCharge Weight
1BANGALORE2,454,8401,113178,394198,321
2CHENNAI2,236,050585173,361210,762
3DELHI2,103,823851149,282173,547
4GREATER MUMBAI2,050,251965131,233158,786

Now if I Sort the table on the basis of CHARGE WEIGHT It will give me the result below one :

      

GatewaySum([S.NO])Sum([Total Sale])Sum([Actual Weight])Sum([Charge Weight])Sum([Total Waybill])
CHENNAI22236050173361210762585
BANGALORE124548401783941983211113
DELHI32103823149282173547851
GREATER MUMBAI42050251131233158786965

But My Requirement is below one

      

GatewaySum([S.NO])Sum([Total Sale])Sum([Actual Weight])Sum([Charge Weight])Sum([Total Waybill])
CHENNAI12236050173361210762585
BANGALORE224548401783941983211113
DELHI32103823149282173547851
GREATER MUMBAI42050251131233158786965

So conclusion is , If there is a key like Serial no it will not let me sort on the basis of measure , You can add a dimension at Edit option and see  and if I remove the serial no it will let me sort on the basis of any measure but I am looking for a solution which let me sort even if Serial No is in table .

I am attaching an app where I have added one rank column and you can see sort is not working

Tags (1)
7 Replies
galax_allu
Valued Contributor

Re: Rank in table

Hi

will you please check following link , I think some similarity in porblem ??

Help needed with ranking selections!!!

Not applicable

Re: Rank in table

I Think you mentioned link has some other issue than what I have.

I have multiple dimensions and measures in my table and I need a rank columns which works from 1 to last one always when I perform sorting on the basis of any measure . I have added a new column ROWNO() but it makes me can't sort the table. and If I added serial no as rank , it get also change the number with sorting. As Serial No should always comes as 1,2,3,4,...100 not like 1,10,5,,9 ...

galax_allu
Valued Contributor

Re: Rank in table

Hi,

try '   S.NO' & rank(S.NO)  in expresssion

Hope this will not change even if you change(sort) any dimension ?

idogridish2
Contributor II

Re: Rank in table

hi rohitkumar1609

did you try using sort by expression the getaway dim by sum(S.NO)?

see the attached.

Not applicable

Re: Rank in table

HI Ido,

the sheet you have attached , there is no sorting working on any measure , I need sorting will work on any measure or any dimension but serial no or row no will not change, Its like There are 5 measure and I sort on measure one , so the serial no will be 1, 2,3,4,.. same works for every measure.

Not applicable

Re: Rank in table

Hi Alluriah,

I tried to make a dimension with your mentioned formula ,  but it is giving me an invalid dimension

Not applicable

Re: Rank in table

Hi All,

Has anyone found any solution for this concern ?

Community Browser