Skip to main content
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
Anonymous
Not applicable

do like this:

at script level:

mid(CompanyName,3,len(CompanyName)) as CompanyName

PrashantSangle

Hi,

use subfield(FieldNAme,' ',2)

or

replace(FieldName,'M3M','')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable

in your case:

Take it 4 which is the position from where string should start:

mid(CompanyName,4,len(CompanyName)) as CompanyName

avinashelite

try like this

=replace(Project_field_NAME','M3M',null())  as new_project 

Not applicable

Hi Anil

Does the roject column has values starting with M3M for all vaues.

if yes then u can go with Left trim .

Regards

Timba

jagan
Luminary Alumni
Luminary Alumni

Hi Anil,

Try

replace(FieldName,'M3M','')


Regards,

Jagan.

jyothish8807
Master II
Master II

Hi Anil,

Try like this: keep a extra space after M3M

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


Regards

KC

Best Regards,
KC
ahmar811
Creator III
Creator III

try this hope this help you

ltrim((purgechar ( 'project','M3M' )) as project

Not applicable

Hi Jyothish

what  would be the case if  M3M is in between the values.

Plz let me knw how to proceed.

Regards

Timba