Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

1 Solution

Accepted Solutions
MVP
MVP

Return Integer from a String

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

2 Replies
MVP
MVP

Return Integer from a String

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

Return Integer from a String

Hi,

Check with this.

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

or

=Keepchar(string,'0123456789')

Celambarasan

Community Browser