Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
LRAngela
Contributor III
Contributor III

Locate and intercept data


Could you help me solve this  question?  I want to intercept the string after the last comma.

For example, the three rows of data on the picture intercept the part with the red line. Thanks in advance.

LRAngela_1-1671002996646.png

 

 

Labels (1)
2 Solutions

Accepted Solutions
tresesco
MVP
MVP

Try subfield() with -1 field no parameter, like:

Subfield('your string here with ....... , expected output here', ',' , -1)

View solution in original post

LRAngela
Contributor III
Contributor III
Author

thanks .i have a solution for this problem.

i can run use this way,

mid(Address,Index(Address,',',-1)+1,(len(Address)-Index(Address,',',-1)))

View solution in original post

4 Replies
tresesco
MVP
MVP

Try subfield() with -1 field no parameter, like:

Subfield('your string here with ....... , expected output here', ',' , -1)

Mark_Little
Luminary
Luminary

HI,

Depends how you load script is being handled. 

If it is load as a csv like below

LOAD

A,

B,

C,

D

From ...

Just remove the forth field from the load like below.

LOAD

A,

B,

C,

D

From ...

 

Else you would need to look at Subfield function if it is loaded in a single field.

Mark

LRAngela
Contributor III
Contributor III
Author

thanks .i have a solution for this problem.

i can run use this way,

mid(Address,Index(Address,',',-1)+1,(len(Address)-Index(Address,',',-1)))

LRAngela
Contributor III
Contributor III
Author

it runs ok ,too.