Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trouble Ranking

Hi,

I'm making a contest and I'm using different variables to rank each player. The final score is determined by the sum of each variable.

However, I'm having trouble using the rank function, because I want to see the min value (for all values that fit in the same range) and the next value displayed must be the consecutive one.

For example, in column D I have 1, 2, 3, 3, 3 and then it jumps on to 6. I need this to be 1, 2, 3, 3, 3, 4, 4, 4, 5... and so on. Is there a way to achieve this? I've tried using all of the rank modes but apparently it's not possible using this function.

I need all of the variables to be ranked at the same time so, I can´t use the above/before functions.

Thanks

1 Solution

Accepted Solutions
flipside
Partner - Specialist II
Partner - Specialist II

Only way I can think of to do this would be to create a concatenated list of distinct values (ordered by value), then get the position of the value in that list using the MATCH function, something like ...

Create variable as ...

=chr(39) & replace(concat(distinct Position ,';' ,Position) ,';',chr(39) & ',' & chr(39)) & chr(39)

... then reference the variable in an expression ...

=match(Position,$(Variable))

flipside

View solution in original post

2 Replies
flipside
Partner - Specialist II
Partner - Specialist II

Only way I can think of to do this would be to create a concatenated list of distinct values (ordered by value), then get the position of the value in that list using the MATCH function, something like ...

Create variable as ...

=chr(39) & replace(concat(distinct Position ,';' ,Position) ,';',chr(39) & ',' & chr(39)) & chr(39)

... then reference the variable in an expression ...

=match(Position,$(Variable))

flipside

Not applicable
Author

Wow!! I'd never thought of that.

It worked perfectly. Thank you so much!