im looking for a script command that converts a product field (where the first digit of the value represents the production year info)
into separate year-fields (dummywise):
So the first digit of the product_nr 308480429 should be converted into a new field 2013
046011640 into 2010,
a script command that generates a new year field based on the first digit of the product_nr:
Maybe you can answer both questions?
Anyways, thanks in advance!
Solved! Go to Solution.
always helpful, thanks again.
also correct, although there was one 2010', obviously copy&paste, too much.
Thank you, too.
With your help i could generate the 1st dummy-variant by myself (see qlik table scrrenshot below) with the follwoing code lines in the script:
|pick(match(left(PRODUCT_NR,1),'0'),'1') as 2010,|
|pick(match(left(PRODUCT_NR,1),'1'),'1') as 2011,|
|pick(match(left(PRODUCT_NR,1),'3'),'1') as 2013,|
|pick(match(left(PRODUCT_NR,1),'4'),'1') as 2014;|