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: 
Not applicable

how to trim the value in field

Hi Guys,

I am having a field value with this kind of data DG10101 - NY, DownTown, QP 9.

now I need to load the data into QVW and I wanted to eliminate DG10101 - this value and load only NY, DownTown, QP 9 this .

how can I trim the data. the field name id ''TerritoryName''.

please help me.

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

You can use subfield if your values always has the same logic that you need the text after the "-" character e.g.

Subfield(TerritoryName,'- ',2) as NewTerritoryName

View solution in original post

2 Replies
stigchel
Partner - Master
Partner - Master

You can use subfield if your values always has the same logic that you need the text after the "-" character e.g.

Subfield(TerritoryName,'- ',2) as NewTerritoryName

sunny_talwar

If the data follows the same idea Something1 - Something2 and you want to remove Something1, you can try this:

SubField(FieldName, ' - ', 2) as TrimmedFieldName

I hope this helps.

Best,

Sunny