Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

pzwonford
New Contributor II

Date number

Hi guys,

I have a file with a list of dates

Load

PIN

Application_Medium

Application_date

FROM

(ooxml, embedded labels, table is [Results]);

Is there an autonumber function i can use to assign a sequential number to each date starting from lowest to highest? So for example

DateDate #
01/01/20161
01/02/20162
01/03/20163
01/04/20164
1 Solution

Accepted Solutions

Re: Date number

Sure, you can try

AutoNumber(Application_date) as Date#

but you will have to make sure that the table is sorted in the ascending order of Application_date to give the correct sort order. Sorting (using Order By) can only be done in Resident load.


Something along these lines:


Table:

LOAD PIN

Application_Medium

Application_date

FROM

(ooxml, embedded labels, table is [Results]);


FinalTable:

LOAD *,

          AutoNumber(Application_date) as Date#

Resident Table

Order By Application_date;


DROP Table Table;

1 Reply

Re: Date number

Sure, you can try

AutoNumber(Application_date) as Date#

but you will have to make sure that the table is sorted in the ascending order of Application_date to give the correct sort order. Sorting (using Order By) can only be done in Resident load.


Something along these lines:


Table:

LOAD PIN

Application_Medium

Application_date

FROM

(ooxml, embedded labels, table is [Results]);


FinalTable:

LOAD *,

          AutoNumber(Application_date) as Date#

Resident Table

Order By Application_date;


DROP Table Table;

Community Browser