Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have my data assigned a rank against it like this:
rank | values |
1 | 456 |
2 | 400 |
3 | 300 |
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)
rank | values |
456 | |
400 | |
300 | |
234 |
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(......
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.
looking forward for the response on this.
u want maximum rank and its value in text box? can you explain the desired output
rank | values |
1 | 456 |
2 | 400 |
3 | 300 |
4 | 234 |
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)
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
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?