Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

How to trim column value

Dear Comunity,

i have one column name is"project"

and value is

M3M COSMOPOLITAN

M3M COSMOPOLITAN

M3M COSMOPOLITAN,M3M GOLF ESTATE - Fairway East

M3M COSMOPOLITAN,M3M URBANA

now i want to represent project name without "M3M "  . plz suggest how to remove m3m  from all the values  in chart expression .

i attached screenshop

14 Replies
mohammadkhatimi
Partner - Specialist
Partner - Specialist

Hi,

Try this..

subfield(FieldName,' ',2)  as NewField


Regards,

Mohammad

Anonymous
Not applicable

with replace(), sequence or position does not matter...

It will serach the M3M in complete string and will replace it

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi Anil,

Please find below script.

Data:

Load * Inline

[

Company

M3M COSMOPOLITAN

M3M COSMOPOLITAN

M3M COSMOPOLITAN M3M GOLF ESTATE - Fairway East

M3M COSMOPOLITAN M3M URBANA

];

Load

Company,

Replace(Company,'M3M ','') as FieldName

Resident Data;

DROP Table Data;

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Above scrpit Gives you result like below:

replace().PNG

jyothish8807
Master II
Master II

Hi Timba,

Same approach can be used if M3M is present in between also

Regards

KC

Best Regards,
KC