Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vesiletaskiran
Contributor III
Contributor III

Index function search multiple characters

Hello, 

I have a field delimited by either '.', '_' or '-' 

is it possible to use index function to return index  to one of these? index(field, ',/-/_')

or which function I should use?

Thanks.

1 Solution

Accepted Solutions
vesiletaskiran
Contributor III
Contributor III
Author

Giving expected output as below + instead of or, at the end only one of them is true.

=Mid(WO_SLA_TYPE,(Index(WO_SLA_TYPE, '.') + Index(WO_SLA_TYPE, '_') + Index(WO_SLA_TYPE, '–') + Index(WO_SLA_TYPE, '-')))

View solution in original post

5 Replies
Anil_Babu_Samineni

What about

If(Index(field, '.') or Index(field, '_') or Index(field, '-'), field)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vesiletaskiran
Contributor III
Contributor III
Author

Tried but it returns -1

(Index(field, '.') or Index(field, '_') or Index(field, '–') or Index(field, '-'))

Anil_Babu_Samineni

Where are you trying that? I have given to use in Script.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vesiletaskiran
Contributor III
Contributor III
Author

Testing it on straight table first then will implement to script. It looks like below.

=Mid(WO_SLA_TYPE,(Index(WO_SLA_TYPE, '.') or Index(WO_SLA_TYPE, '_') or Index(WO_SLA_TYPE, '–') or Index(WO_SLA_TYPE, '-'))+2)

vesiletaskiran
Contributor III
Contributor III
Author

Giving expected output as below + instead of or, at the end only one of them is true.

=Mid(WO_SLA_TYPE,(Index(WO_SLA_TYPE, '.') + Index(WO_SLA_TYPE, '_') + Index(WO_SLA_TYPE, '–') + Index(WO_SLA_TYPE, '-')))