Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

urgent requirement

I have my data assigned a rank against it like this:

   

rankvalues
1456
2400
3300
4

234

this works fine to be displayed in straight table in qlik,

now I want similar functionality in my text objects too,so it shud pick up the rank automatically according to the decreasing order of the values displayed ,expressions used for two columns are as below:

rank(count(distinct id),dimension)    (for rank column)

    =count(distinct id)   (for values column)

   

rankvalues
456
400
300
234
17 Replies
Chanty4u
MVP
MVP

may be this you want?

Ranking position on a text box

Anonymous
Not applicable
Author

thanks,but its not givng me the desired ranks,

Anonymous
Not applicable
Author

rank(count({<dimension>}distinct id),dimension)

its just giving balnk,no ranks,

and if I hardcode the values:

rank(count({<dimension={'value1'}>}distinct id),dimension)

rank(count({<dimension={'value2}>}distinct id),dimension)

rank is not changing in this case?

avinashelite

if your trying it in the text box add the aggr and concat .e.g.

=Concat(Aggr(rank(Count(distinct ID),dimension),dimension),':')

Anonymous
Not applicable
Author

thanks for sharing this,

the logic seems to be working fine,when am selecting values from a list box,

but when I hardcode the field values in that ,

text object is not giving me desired output,

like for eg:rank(count({<dimension>}distinct id),dimension)

tis is working fine,so if I select any value from the list box giving the right rank,

but if I do like this:rank(count({<dimension={'value1'}>}distinct id),dimension)

this is not taking the right ranks for the dimension values

(selections made on the sheet for other filters)

kndly help,

Anonymous
Not applicable
Author

can anyone help regarding the same,

ogautier62
Specialist II
Specialist II

Hi,

in dimension :

if(getselectedcount("dimension")>0, if( getfieldselections('dimension') <> 'total',$(= getfieldselections("dimension")), ),)

and then expression :

rank(count distinct id)

count(distinct id)

regards

Anonymous
Not applicable
Author

am using a text object for this

ogautier62
Specialist II
Specialist II

ok,

but why use a text object to display multiple rows ??