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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Do a group by using a rowno

Hi all ,

I'm trying to do something in QV .

The issue that i have a table like this .

ID1  ID2

1      1

1       23

1       2

2       43

6       64

1       8

2       55

6      77

6      80

what i want to have is :

ID1  ID2   Order

  1   1     1

  1   2     2

  1   8     3

  1   23   4

  2   43   1

  2   55    2

  6   64    1

  6   77    2

   6   80    3

Thx

5 Replies
sujeetsingh
Master III
Master III

Didnt get you ?

swuehl
MVP
MVP

Maybe like this:

INPUT:

LOAD * INLINE [

ID1,  ID2

1,      1

1,       23

1,       2

2,       43

6,       64

1,       8

2,       55

6,      77

6,      80

];

LOAD     ID1,

        ID2,

        AutoNumber(ID2,ID1) as Order

Resident INPUT order by ID1, ID2;

drop table INPUT;

Not applicable
Author

hi

according to swuehl , see the attachement.

thanks swuehl.

Not applicable
Author

ID2 seems to be sorted as String.

Try Num#(ID2) as ID2 in the load and sort afterwards.

Ciao

Klaus

Not applicable
Author

Thanx everybody swuehl's solution is what i want .