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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nvijay5757
Creator
Creator

subfield

Hi,

i am trying subfield function,

my data looks like this

2017_P558_08m_RB_20838_INTd_Single-FCS-Upper_RC_Acceleration_Custom Filter_100Hz_2O

from this i want to extract    08m_RB_20838

i have tried this only one string is showing  like 08m

SubField(Test,'_',3) as Test1,

please help me thanks

Labels (3)
1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Try with Index and Mid function.

Like

=Mid(Text, Index(Text,'_',2)+1,Index(Text,_',5)-Index(Text,'_',2)-1)

Or combine the value using subfield

=SubField(Text,'_',3)&'_'&SubField(Text,'_',4)&'_'&SubField(Text,'_',5)

View solution in original post

3 Replies
salonicdk28
Creator II
Creator II

Hi,

Try this -

Left(Right(mid(Test,Index(Data,'_',2),Index(Test,'_',-9)),Len(mid(Test,Index(Test,'_',2),Index(Test,'_',-9)))-1),Len(mid(Test,Index(Test,'_',2),Index(Test,'_',-9)))-2) as Test1

Thanks!

settu_periasamy
Master III
Master III

Hi,

Try with Index and Mid function.

Like

=Mid(Text, Index(Text,'_',2)+1,Index(Text,_',5)-Index(Text,'_',2)-1)

Or combine the value using subfield

=SubField(Text,'_',3)&'_'&SubField(Text,'_',4)&'_'&SubField(Text,'_',5)

nvijay5757
Creator
Creator
Author

Hi,

Thanks. subfield is working.