Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trim last Part of text field put it as a new field

Team,

    

 

Fieldcomment
1

Working on support_ALM1234,

     Working on Read rate_SLA345

2

support process_IN4353,

Billed 100%_ALM234

3

Working on issues_ALM2357,

working on Support_IN56452

from the table i want to result should be  trim the value after '_'  value as a new field.

For example:

     desired output should be like following below:

    

fieldcommentTicket ID
1Working on supportALM1234
1Working on Read rateSLA345
2support processIN4353
2Billed 100%ALM234

Please suggest.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Table:

LOAD SubField(Newcomment, '_', 1) as Comment,

  SubField(Newcomment, '_', 2) as [Ticket ID],

  Field;

LOAD Trim(SubField(comment, ',')) as Newcomment,

  Field;

LOAD Field,

    comment

FROM

[https://community.qlik.com/thread/250332]

(html, codepage is 1252, embedded labels, table is @1);


Capture.PNG

View solution in original post

5 Replies
sunny_talwar

Try this:

Table:

LOAD SubField(Newcomment, '_', 1) as Comment,

  SubField(Newcomment, '_', 2) as [Ticket ID],

  Field;

LOAD Trim(SubField(comment, ',')) as Newcomment,

  Field;

LOAD Field,

    comment

FROM

[https://community.qlik.com/thread/250332]

(html, codepage is 1252, embedded labels, table is @1);


Capture.PNG

MK_QSL
MVP
MVP

Data:

Load

  Field,

  Trim(SubField(comment,'_',1)) as comment,

  Trim(SubField(comment,'_',2)) as [Ticket ID]

;

LOAD Field,

     SubField(comment,',') as comment

FROM

[https://community.qlik.com/thread/250332]

(html, codepage is 1252, embedded labels, table is @1);

MK_QSL
MVP
MVP

You already replied !!!! LOL

sunny_talwar

Anonymous
Not applicable
Author

thank you sunny