Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Position of character in a string

Hi All,

I have an basic question.

I have text object with value as "ABCD%EFG%"

How can I go about finding the position of % and display in another text object?

Thanks,

John

1 Solution

Accepted Solutions
Highlighted

Re: Position of character in a string

Try this

=Concat(If(Index('ABCD%EFG%', '%', ValueLoop(1, 100)) > 0, Index('ABCD%EFG%', '%', ValueLoop(1, 100))), ', ')

 

View solution in original post

6 Replies
Highlighted

Re: Position of character in a string

Try this

=Index('ABCD%EFG%', '%')
Highlighted
Partner
Partner

Re: Position of character in a string

Highlighted
Contributor II
Contributor II

Re: Position of character in a string

Thanks

The first occurrence displays as 5 but it is not bringing the second occurrence.

Highlighted
Contributor II
Contributor II

Re: Position of character in a string

Thanks

I used this expression and it returns 8. But I need the position 4 also.

How can I do that?

=FindOneOf('ABC#DEV#','#',2)

Highlighted

Re: Position of character in a string

Try this

=Concat(If(Index('ABCD%EFG%', '%', ValueLoop(1, 100)) > 0, Index('ABCD%EFG%', '%', ValueLoop(1, 100))), ', ')

 

View solution in original post

Highlighted
Contributor II
Contributor II

Re: Position of character in a string

Wow.  That's an awesome advanced expression and it works.

Thanks much Sunny!