Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Return Integer from a String

Should be a simple task:

I have a standard string. When a certain sequence occurs in the string, I want to return the next 7 integers in the string. For example:

String = "thisisastringthisisastringthisisastringstringnumber=1234567thisisastringthisisastring"

In this case I was to return the value "1234567"

So far what I got is this: if(index(lower(string), 'stringnumber='),...

How do I tell Qlikview to find me those numbers in this statement?

Eric

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You are on the right track, use the mid() function to get your numbers:

=mid(string,index(lower(string),'stringnumber=')+13,7)

Hope this helps,

Stefan

View solution in original post

2 Replies
swuehl
Champion III
Champion III

You are on the right track, use the mid() function to get your numbers:

=mid(string,index(lower(string),'stringnumber=')+13,7)

Hope this helps,

Stefan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Check with this.

=mid(string,index(string,'number=')+7,7)

or

=Keepchar(string,'0123456789')

Celambarasan