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: 
d_koti24
Creator II
Creator II

Regarding rank() issue?

Hi All,

I Want rank with out gaps, like this :

Namenumrank
A501
B702
C702
D903
E1004
F1505
G2006

Is it possible ?

Thanks &Regards,

kd

6 Replies
sunny_talwar

May be this:

LOAD Name,

          num,

          AutoNumber(num) as Rank

FROM Source;


Slight update


Table:

LOAD Name,

          num

FROM Source;


NewTable:

LOAD *,

          AutoNumber(num) as Rank

Resident Table

Order By num;


DROP Table Table;

marcus_sommer

If your table is sorted like the table above you could simply use rowno() or rowno(total).

- Marcus

sunny_talwar

Used the following Script:

Table:

LOAD Name,

    num

FROM

[https://community.qlik.com/thread/176812]

(html, codepage is 1252, embedded labels, table is @1);

NewTable:

LOAD *,

    AutoNumber(num) as Rank

Resident Table

Order By num;

DROP Table Table;

To get this:

Capture.PNG

d_koti24
Creator II
Creator II
Author

Thanks for your quick reply.

is it possible to do this at UI level.

Regards,

sunny_talwar

Is this helpful? Not the exact, but do you want 1223456 or 1224567 works?

Capture.PNG

d_koti24
Creator II
Creator II
Author

i want this order 1223456