Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
kvijay173
Creator
Creator

TextBetween with multiple conditions

  COLUMN A

CN=SUPPORT,DC=TOMKINS,DC=NET
CN=Operations Manager ,DC=na,DC=corp

Hi Friends, I need help in using TextBetween.

I have a column as Column A. I would like to extract na alone similarly TOMKINS alone.

I used TextBetween(distinguishedName,'DC=',',DC=corp') and I have got as result. But I have to include the condition in the same script line for extracting TOMKINS. Please help.

I tried  the below but TOMKINS is not coming... 

If(Index(distinguishedName,'CN'),TextBetween(distinguishedName,'DC=',',DC=corp'),TextBetween(distinguishedName,'DC=',',DC=NET')) as [Domain],

1 Solution

Accepted Solutions
CELAMBARASAN
Partner
Partner

Why could use simply

=TextBetween(distinguishedName,'DC=',',DC=')

View solution in original post

4 Replies
robert_mika
Master III
Master III

Not 100% sure but try this:

=TextBetween('

CN=SUPPORT,DC=TOMKINS,DC=NET

CN=Operations Manager ,DC=na,DC=corp','DC=',',DC=')

04-Jun-15 1-56-13 PM.jpg

alexandros17
Employee
Employee

try with

TextBetween(distinguishedName,'DC=',',DC=corp') or TextBetween(distinguishedName,'DC=',',DC=NET')) as [Domain],

CELAMBARASAN
Partner
Partner

Why could use simply

=TextBetween(distinguishedName,'DC=',',DC=')

maxgro
MVP
MVP

a different one, maybe

=replace(subfield('CN=SUPPORT,DC=TOMKINS,DC=NET', ',', 2), 'DC=', '')