Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to search for parts of text and rename them.
For example, my description now looks like this:
Item | Description |
---|---|
A | Soft Blue Adrien |
B | Adrien Light Tan |
C | Adrien White/Blue eclipse Nappa/Pu/Nappa |
D | White/Nautical Blue Adrien Nappa/Pu/Patent |
E | Jester - Suede/burning lthr - Logger XS |
F | Logger XS Dutch blue |
G | Logger XS- Dutch blue - Suede/burning lthr/suede perf |
H | Ice Blue Logger XS Suede canvas |
I want the fields where 'Adrien' is mentioned in the description, to be renamed to 'Adrien'.
And when 'Logger XS is mentioned I want them to be renamed to 'Logger XS'.
Item | Description | New Description |
---|---|---|
A | Soft Blue Adrien | Adrien |
B | Adrien Light Tan | Adrien |
C | Adrien White/Blue eclipse Nappa/Pu/Nappa | Adrien |
D | White/Nautical Blue Adrien Nappa/Pu/Patent | Adrien |
E | Jester - Suede/burning lthr - Logger XS | Logger XS |
F | Logger XS Dutch blue | Logger XS |
G | Logger XS- Dutch blue - Suede/burning lthr/suede perf | Logger XS |
H | Ice Blue Logger XS Suede canvas | Logger XS |
Is this possible?
I tried a formula like this:
aggr(if(left("[Description]",2)='Adrien', 'Logger XS', ''), "[Description]")
But that is not working, I think because the search criterea can be everywhere in the description?
if(SubStringCount(Description, 'Adrien')>0, 'Adrien', if(SubStringCount(Description, 'Logger XS')>0,'Logger XS'))
Look into 'Mapping with Wildcards' in Rob's recipe collection
if(SubStringCount(Description, 'Adrien')>0, 'Adrien', if(SubStringCount(Description, 'Logger XS')>0,'Logger XS'))
if(wildmatch(Item,'*Adrein*'),'Adrein',if(wildmatch(Item,'*'Logger XS'*'), 'Logger XS')))
Hi,
Try like this
LOAD
*,
Pick(Wildmatch(Description,'*Adrein*', '*Logger XS*'), 'Adrein', 'Logger XS') AS NewDescription
FROM DataSource;
Regards,
jagan.
Used these Condition at load time
if(wildmatch(Description,'*Adrien*'),'Adrien',if(wildmatch(Description,'*Logger XS*'),'Logger XS')) as new_filed
and also used on Dimension condition
if(wildmatch(Description,'*Adrien*'),'Adrien',if(wildmatch(Description,'*Logger XS*'),'Logger XS'))
hope this can help you
Thanks, it's working good.
Thanks, this is also working good!
Thanks, this is also working good!