Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rodrigue_saade
Partner - Creator
Partner - Creator

Section Access

Hi,

i have the following case in section access:

    

AccessUserIDPasswordRegionID
UserAUserAxx01-00-00
UserAUserAxx01-00-01
UserAUserAxx01-00-02
UserAUserAxx01-00-03
UserAUserAxx01-00-04
UserAUserAxx01-00-05
UserAUserAxx01-00-06
UserAUserAxx01-00-07
UserAUserAxx01-00-08
UserAUserAxx01-00-09
UserAUserAxx01-01-00
UserAUserAxx01-01-01
UserAUserAxx01-01-02
UserAUserAxx01-01-03
UserAUserAxx01-01-04
UserAUserAxx01-01-05
UserAUserAxx01-01-06
UserAUserAxx01-01-07
UserAUserAxx01-01-08
UserAUserAxx01-01-09
UserAUserAxx01-02-00
UserAUserAxx01-02-01
UserAUserAxx01-02-02
UserAUserAxx

01-02-03

UserAUserAxx09-09-09

Is there any way to autogenerate the values of RegionID, since the values are well defined for the same user from 01-00-00 till 09-09-09?

1 Solution

Accepted Solutions
maxgro
MVP
MVP

R:

load num(rowno(), '00') as R1 AutoGenerate 9;

join (R) load num(rowno()-1, '00') as R2 AutoGenerate 10;

join (R) load num(rowno()-1, '00') as R3 AutoGenerate 10;

Left join (R) load *, text(R1 & '-' & R2 & '-' & R3) as AllRegion Resident R;

S:

LOAD Distinct

  Access,

    UserID,

    Password

FROM

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

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

join (S) load AllRegion as Region Resident R;

DROP Table R;

View solution in original post

4 Replies
ecolomer
Master II
Master II

maxgro
MVP
MVP

R:

load num(rowno(), '00') as R1 AutoGenerate 9;

join (R) load num(rowno()-1, '00') as R2 AutoGenerate 10;

join (R) load num(rowno()-1, '00') as R3 AutoGenerate 10;

Left join (R) load *, text(R1 & '-' & R2 & '-' & R3) as AllRegion Resident R;

S:

LOAD Distinct

  Access,

    UserID,

    Password

FROM

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

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

join (S) load AllRegion as Region Resident R;

DROP Table R;

Anonymous
Not applicable

Not related to your question - but you must use REGIONID instead of RegionID if you want to use it for data reduction.

rodrigue_saade
Partner - Creator
Partner - Creator
Author

Solved!! Thank you Massimo, and Thank you all guys.