Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
olramirez
Contributor III
Contributor III

Special sequence in straight table?

Hello,

could help me with this special sequence in Straight table please?

The order is by Botiquin, Fecha de Emisión and Documento, but the Sequence should repeat when the Documento column is the same.

   

Special SequenceBOTIQUINFECHA DE EMISIONDOCUMENTO
1CUAUHTEMOC METRO FARMA04/04/2016ER16-9994
2CUAUHTEMOC METRO FARMA13/04/2016HR16-8404
2CUAUHTEMOC METRO FARMA13/04/2016HR16-8404
2CUAUHTEMOC METRO FARMA13/04/2016HR16-8404
2CUAUHTEMOC METRO FARMA13/04/2016HR16-8404
3CUAUHTEMOC METRO FARMA22/04/2016CR16-9169
4CUAUHTEMOC METRO FARMA24/04/2016CR16-9182
4CUAUHTEMOC METRO FARMA24/04/2016CR16-9182
5CUAUHTEMOC METRO FARMA25/04/2016036600
5CUAUHTEMOC METRO FARMA25/04/2016036600
6CUAUHTEMOC METRO FARMA25/04/2016085133
7CUAUHTEMOC METRO FARMA25/04/2016085139
8CUAUHTEMOC METRO FARMA25/04/2016087533
9CUAUHTEMOC METRO FARMA25/04/2016165969
10CUAUHTEMOC METRO FARMA25/04/2016166000
10CUAUHTEMOC METRO FARMA25/04/2016166000
11TICOMAN02/04/2016207963
12TICOMAN13/04/2016206474
13TICOMAN13/04/2016206477
13TICOMAN13/04/2016206477
14TICOMAN25/04/2016206478
15TICOMAN25/04/2016206487
15TICOMAN25/04/2016206487

   

1 Solution

Accepted Solutions
sunny_talwar

Something like this?

Table:

LOAD RowNo() as UniqueKey,

  BOTIQUIN,

    [FECHA DE EMISION],

    DOCUMENTO

FROM

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

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

FinalTable:

LOAD *,

  AutoNumber(BOTIQUIN&[FECHA DE EMISION]&DOCUMENTO) as SpecialSequence

Resident Table

Order By BOTIQUIN, [FECHA DE EMISION], DOCUMENTO;

DROP Table Table;

View solution in original post

6 Replies
Anonymous
Not applicable

Hi Olga,

Not sure if I follow the query here. You want a same number to appear in column Special Sequence for the matching values in DOCUMENTO column right? In your screenshot I think that is already the case, no?

Tx

Nakul

olramirez
Contributor III
Contributor III
Author

Hello Nakul,

yes, That's the case, i would like to know if exist some function to do this sequence.

Thanks

olramirez
Contributor III
Contributor III
Author

Hello Sunny,

i don't understand the Autonumber, how can i use it?

Thanks

sunny_talwar

Something like this?

Table:

LOAD RowNo() as UniqueKey,

  BOTIQUIN,

    [FECHA DE EMISION],

    DOCUMENTO

FROM

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

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

FinalTable:

LOAD *,

  AutoNumber(BOTIQUIN&[FECHA DE EMISION]&DOCUMENTO) as SpecialSequence

Resident Table

Order By BOTIQUIN, [FECHA DE EMISION], DOCUMENTO;

DROP Table Table;

sunny_talwar

Look at the sample I provided below

olramirez
Contributor III
Contributor III
Author

Thanks Sunny, i get it!