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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
whereismytowel
Contributor
Contributor

Cut String where the first delimiter is either . or :

Hi,

i have a bunch of Strings stored in a Field which i need to cut with the textbetween function.

So the strings could be something like:

123.ABC

or 123:ABC

The Strings have different lengths so i cant use the left or right function.

So i just need to cut the String after the first occurence of either . or :

Unfortunately something like this doesn't work
TextBetween('InputText, '.' or ':', '', 1)

Does anybody have an idea how to cut the string after the first occurence of either . or : ?

I need a pretty performant solution since i handle an extremely huge data set

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

I would try to unify the different delimiters and then applying the cutting-logic, maybe like:

subfield(replace(Field, '.', ':'), ':', 1)

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

use Subfield() as below

 

Subfield(Subfield(FieldName,'.',1),':',1)  as newField

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
marcus_sommer

I would try to unify the different delimiters and then applying the cutting-logic, maybe like:

subfield(replace(Field, '.', ':'), ':', 1)