Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
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
Partner

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
Partner

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

evansabres
Specialist
Specialist
Author

Thank you!

evansabres
Specialist
Specialist
Author

Thank you!

evansabres
Specialist
Specialist
Author

Thank you!