Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
ogautier62
Specialist II
Specialist II

Here is,

= concat(aggr(count( distinct id), $(=if(getselectedcount("dim")>0, if( getfieldselections('dim') <> 'total',getfieldselections("dim"),),))),'\n')

just add rank too

count( distinct id) & '      '   & rank(......

Anonymous
Not applicable
Author

thanks for sharing this,but It doesn't seem to be working.

and also am not so clear on the logic,can you please help in explaining this.

Anonymous
Not applicable
Author

looking forward for the response on this.

raajaswin
Creator III
Creator III

u want maximum rank and its value in text box? can you explain the desired output

Anonymous
Not applicable
Author

rankvalues
1456
2400
3300
4

234

manoj217
Creator III
Creator III

Text object will show only one value not all the values.

if you want all the values means you have to choose list box, else you can show only one value in text object (rank 1 value)

Anonymous
Not applicable
Author

Hello..

You can do this in backend.

i have created inline table with value in random sequence

test:

LOAD * INLINE [

    value

    500

    300

    350

    200

    250

    100

];

then i use preceding load where values are order by descending order and then i applied Autonumber() for ranking in decresing order

load *,

AutoNumber(value) as rank;

load

value

Resident test

order by value desc;

so if u select any value it will display rank with respect to that value

Capture.JPG

Anonymous
Not applicable
Author

yes thats great,thanks for sharing this,so this is working when u select values from a list box,suppose,

u need to do the same functionality in a text object ,then how would u do it?

like if u hardcode these values 100,200,250 so on like this u have  6 text objects,

how it will be achieved?