Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Remove

HI All

How to remove a word from the field

That is There is a field (cloumn name ) "Product " in which the conetect is like

D5400

D23Mto

DMk344

I want to take out the first letter that is "D" and want to display the alphabets after D ?

and the result should be like this :

5400

23Mto

MK344... and so on

6 Replies
marcus_sommer

Try: mid(YourField, 2) as YourField.

- Marcus

MayilVahanan

Hi

Try like this

=If(Left(Product, 1) = 'D', PurgeChar(Product, 'D'), Product )

or

=If(Left(Product, 1) = 'D',Mid(Product, 2), Product )

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Other option is

Right(YourField,len(Yourfield)-1) as NewField.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
HirisH_V7
Master
Master

Hi,

Check this,

SubField(Colo,'D',2) as Column

HTH,

Hirish



HirisH
“Aspire to Inspire before we Expire!”
engishfaque
Specialist III
Specialist III

Dear John,

Here is a Dynamic Data model,

/*

  ASCII Code

  65 = A

  90 = Z

  97 = a

  122= z

*/

Table1:

LOAD *, If((Left(OldFieldValue, 1) >= Chr(65) and Left(OldFieldValue, 1) <= Chr(90)) or (Left(OldFieldValue, 1) >= Chr(97) and Left(OldFieldValue, 1) <= Chr(122)), Text(PurgeChar(OldFieldValue, Left(OldFieldValue, 1))))  as NewFieldValue Inline [

OldFieldValue

D5400

D23Mto

DMk344

D10

A1010

Z561

];

Kindly find attached QlikView App.

Kind regards,

Ishfaque Ahmed

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this in script

LOAD

*,

Mid(Product, 2) AS Product_New

FROM DataSource;


Regards,

jagan.