Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Auto Number Records

Hi I have the following table:

RegionSitePerson
ABCAZ
ABCBX
ABCBY
DEFCW
DEFC

V

DEFDU

   

I want to create the following indicators. I want the site counter to start over for each region and the person counter to start over for each site.

RegionSitePersonRegion NumRegionalSite NumRegionalSitePerson #
ABCAZ

1

11
ABCBX121
ABCBY122
DEFCW211
DEFC
V
212
DEFDU221

I ahve tryied Autonumber comibations but I cannot get this to work.
Any Help???

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Auto Number Records

Try something like this:

LOAD Region,

     Site,

     Person,

     AutoNumber(Region) as RegionNr,

     AutoNumber(Region&Site,Region) as RegionSiteNr,

     AutoNumber(Region&Site&Person, Region&Site) as RegionSitePersonNr,

     recno() as ID

FROM

[http://community.qlik.com/thread/66783?tstart=0]

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

1 Reply
MVP
MVP

Re: Auto Number Records

Try something like this:

LOAD Region,

     Site,

     Person,

     AutoNumber(Region) as RegionNr,

     AutoNumber(Region&Site,Region) as RegionSiteNr,

     AutoNumber(Region&Site&Person, Region&Site) as RegionSitePersonNr,

     recno() as ID

FROM

[http://community.qlik.com/thread/66783?tstart=0]

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

Community Browser