Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
this is my scenario.
if product name contains 'decoder' then 'DC'
if product name contains 'connectorsr' then 'CN'
if product name contains 'capacitorr' then 'CP'
so it should look like below
id ¦ product ¦ category
1 decoder DC
2 connector CN
3 capacitor CP
please suggest both on script and expression
May be this:
for script -
Pick(WildMatch(product, '*decoder*', '*connector*', '*capacitor*'), 'DC', 'CN', 'CP') as category
for expression -
=Pick(WildMatch(product, '*decoder*', '*connector*', '*capacitor*'), 'DC', 'CN', 'CP')
script
if(wildmatch(product , '*decoder*'),'DC' ,
if(wildmatch(product , '*connector*'),'CN' ,
if(wildmatch(product , '*cpacitor*'),'CP')) As category
calculated Dimension
aggr(,
if(wildmatch(product , '*decoder*'),'DC' ,
if(wildmatch(product , '*connector*'),'CN' ,
if(wildmatch(product , '*cpacitor*'),'CP')),product)
hi sunny,
if this 3 does not match then the condition should be 'not mapped'. how to get that?
Try this:
for script:
Pick(WildMatch(product, '*decoder*', '*connector*', '*capacitor*', product), 'DC', 'CN', 'CP', 'Not Mapped') as category
for expression:
=Pick(WildMatch(product, '*decoder*', '*connector*', '*capacitor*', product), 'DC', 'CN', 'CP', 'Not Mapped')
Hi ,
Pick(WildMatch(product, '*decoder*', '*connector*', '*capacitor*','*'), 'DC', 'CN', 'CP','Not Mapped') as category
You can use like this in script .
Thanks,
hirish
thanks sunny just one more question as my data looks little messy..how can I have 2 conditions
for ex:
if product contains decoder and decoderNew then 'DC'
the asterisk next decoder will take care of decoderNew
Hi sunny,
Iam also getting strange results means. I could see all the codes gets repeated thrice in each
Can you share your script?