Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Autonumber

Hi Experts,

i have the following table.

BranchCal:

LOAD BRCODE,

     DECDDT,

     Date(DECDDT, 'DD/MM/YYYY') as DATE,

     Month(DECDDT) as MONTH,

     MonthName(DECDDT) as MonthYear,

     Year(DECDDT) as YEAR,

    DAYS,

     AutoNumber(BRCODE&'-'&DECDDT) as Key

FROM

QVD\BranchCal.qvd

(qvd);

in the above script i need to do Autonumber for MonthYear field also.

How can i do this.

pls helpppp....

8 Replies
Anonymous
Not applicable
Author

What do you hope to achieve by doing Autonumber for MonthYear field ?

It will already be stored a number and not have many distinct values.

Not applicable
Author

just want to do reference table to avoid synthetic key.

plssssss helppp

jonathandienst
Partner - Champion III
Partner - Champion III

Not sure what advantages this will offer you, but to autonumber multiple sequences, you can use the optional series name parameter:

     AutoNumber(MonthName(DECDDT), 'MonthYear') As MYKey,

     AutoNumber(BRCODE&'-'&DECDDT, 'BrCode') as Key

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

If you mean composite containing all 3 fields:

     AutoNumber(MonthName(DECDDT) & BRCODE & '- '& DECDDT) as Key

But adding MonthName to the key will only make the key larger without adding precision as MonthName is a lower cardinality dependent on DECDDT already in the key.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

i did like this...

BranchCal:

LOAD BRCODE,

     DECDDT,

     Date(DECDDT, 'DD/MM/YYYY') as DATE,

     Month(DECDDT) as MONTH,

     MonthName(DECDDT) as MonthYear,

     Year(DECDDT) as YEAR,

    DAYS,

     AutoNumber(MonthName(DECDDT)&'-'&DECDDT) as Key

FROM

QVD\BranchCal.qvd

(qvd);

and in reference table like this

LOAD Distinct

MonthYear,

     BRCODE,

     DECDDT,

     Key

Resident  BranchCal;

DROP Field BRCODE from BranchCal;

DROP Field DECDDT from BranchCal;

DROP Field MonthYear from BranchCal;

is this correct.???

but i m not getting any values on MonthYear???

pls help

Not applicable
Author

any suggestions plsssss

Not applicable
Author

pls give some suggestions

Anonymous
Not applicable
Author

what are you trying to achieve? I don't understand what you are modelling. Can you upload an example of the qvw?