Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
carlospulgarinz
New Contributor III

Autonumber:

HELP, I Have This script, but it doesn't count it, in the date order:

Imposicion2:

first 30000 LOAD

date,

ID,

AutoNumber(Rowno(), ID) as Cuenta   

   

FROM [lib://Compartidosecreto/PST\Imposicion.qvd]

(qvd);


The result is:


cuenta            Date                  ID

1               05/03/2013               1

2               14/06/2013               1

3               26/03/2013               1

4               17/04/2013               1




But i wolud like, the result like this:


cuenta            Date                  ID

1               05/03/2013               1

4               14/06/2013               1

2               26/03/2013               1

3               17/04/2013               1


Tags (2)
1 Solution

Accepted Solutions
JustinDallas
Valued Contributor II

Re: Autonumber:

Can you try something like this?

Imposicion2:

first 30000 LOAD

date,

ID

FROM [lib://Compartidosecreto/PST\Imposicion.qvd]

(qvd);

ImposicionFinal:

LOAD *, AutoNumber(Rowno(), ID) as Cuenta

;

LOAD * Resident Imposicion2

ORDER BY date ASC

;

BAJA MESA Imposicion2

;

4 Replies
JustinDallas
Valued Contributor II

Re: Autonumber:

What's the difference between the current result and the desired result?

carlospulgarinz
New Contributor III

Re: Autonumber:

Ther order by date, oldest be the num 1 ... and de newest de number 4

JustinDallas
Valued Contributor II

Re: Autonumber:

Can you try something like this?

Imposicion2:

first 30000 LOAD

date,

ID

FROM [lib://Compartidosecreto/PST\Imposicion.qvd]

(qvd);

ImposicionFinal:

LOAD *, AutoNumber(Rowno(), ID) as Cuenta

;

LOAD * Resident Imposicion2

ORDER BY date ASC

;

BAJA MESA Imposicion2

;

carlospulgarinz
New Contributor III

Re: Autonumber:

Thank you, it worked!