Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to extract a detail from the below field value.
Actual:
Product ID:
HAI000200020876-11300
HAI000200020332-11300
HAI000200020000-11300
AND000200256543-11304
AND000200256525-11304
AND000200256523-11304
CLE136198-11300
CLE133712-11300
CLE133660-11300
CLE133523-11300
Required output:
Product ID:
HAI000200020876-11300
HAI000200020332-11300
HAI000200020000-11300
200256543-11304
200256525-11304
200256523-11304
136198-11300
133660-11300
133523-11300
Thanks..
Hi,
I need to extract a detail from the below field value.
Actual:
Product ID:
HAI000200020876-11300
HAI000200020332-11300
HAI000200020000-11300
AND000200256543-11304
AND000200256525-11304
AND000200256523-11304
CLE136198-11300
CLE133712-11300
CLE133660-11300
CLE133523-11300
Required out put:
Product ID:
HAI000200020876-11300
HAI000200020332-11300
HAI000200020000-11300
200256543-11304
200256525-11304
200256523-11304
136198-11300
133660-11300
133523-11300
Thanks..
Hi,
How about below expression?
1. mid(Product ID,4)
2. keepchar(Product ID,'1234567890-')
3. mid(Product ID,index(Product ID,'1234567890'))
4. IF(Left(Product ID,3)='HAI',Product ID,mid(Product ID,4))
The first 3 Product ID stayed the same, but others changed. Is there a logic behind what you are trying to do?
Look at my response here
Hi, Can you tell me what Qlik product you are discussing, I would like to move this to the forum specific to it as this is a general discussion forum. Thanks
Hi Naresh,
As i Know Trim will drop the spaces between words (Left Trim,Right Trim,Trim..etc..)
but here your requirement will different than Trim
CLE136198-11300 o/p you are expecting like 136198-11300
so you need to be use purgechar().
so you need to use Purgechar(FieldName,'AND000200256543-11304')-- as [Test field] it will omit data from your field
now you need to do like
purgechar([Test field],'CLE') it will remove the characters from your field.
Ex:-
keepchar(Amit1234,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') //
it will give result Amit
purgechar(Amit1234,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')
it will give result 1234