Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Remove Last 10 characters of text in a field

Hello -

I have a field name, called [Line item]. I want to trim the last 10 characters in that field.

What is the scripting to do this?

Thank you,

Evan

1 Solution

Accepted Solutions
oscar_ortiz
Partner - Specialist
Partner - Specialist

I like to inculde the Trim function in case there are beginning or trailing blanks:

Left( [Line item], Len( Trim( [Line item]) ) - 10)

View solution in original post

7 Replies
nagaiank
Specialist III
Specialist III

Try the following expression.

Left([Line Item], Len([Line Item])-10)

maxgro
MVP
MVP

=left([Line item], len([Line item]) -10)

Not applicable

We don't have direct function to achieve this. We can use below expression.

trim(replace([Line Item],right([Line Item],10),' '))

oscar_ortiz
Partner - Specialist
Partner - Specialist

I like to inculde the Trim function in case there are beginning or trailing blanks:

Left( [Line item], Len( Trim( [Line item]) ) - 10)

evansabres
Specialist
Specialist
Author

Thank you!

evansabres
Specialist
Specialist
Author

Thank you!

evansabres
Specialist
Specialist
Author

Thank you!