Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ranking on positive and negative numbers

Hi,

I need to rank values in a straight table that contains both positive and negative numbers.

I need to rank all columns continuosly while the rank() function return very high difference rank from positive to negative values.

So i input is something like that:

ColumnA, KPIValue

A, 9.5

B, 8.65

C, 7.55

D, 4.99

E, 2.23

F, 0.89

G, -1.34

H, -1.98

I, -2.09

L, -3.65

I need an output like this

ColumnA, KPIValue, RANK

A, 9.5, 1

B, 8.65, 2

C, 7.55, 3

D, 4.99, 4

E, 2.23, 5

F, 0.89. 6

G, -1.34, 7

H, -1.98. 8

I, -2.09, 9

L, -3.65, 10

Have you got any idea?

1 Reply
swuehl
MVP
MVP

Not sure if I understand your issue.

Using your data and a straight table with dimension ColumnA, an expression

=Rank(KPIValue)

seems to return the correct rankings as shown in your expected result.

edit:

Updated sample, you need to ensure that separators are set correctly and numbers are read in as numbers.