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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Restricting the subfield output

Hi,

I have the following piece of data

Statement : I love singapore

Statement : An Apple.

Now  I am using subfiled to split the string subfield(Statement,' ').

The output i am looking for is

love

Singapore

Apple

i.e., i want remove all the substrings whose length is less than 4.

Please provide your thoughts on how to implement this.

Regards,

Amar

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

TestData:
Load  * Inline [
Statement
I love India
I love World
Community is Best
];


FieldList:
Load * where Len(vSubField) >= 4;

Load
SubField(Statement, ' ') as vSubField
Resident TestData;

View solution in original post

5 Replies
khadeer
Specialist
Specialist

Hi,

if(len(subfield(Satatement,' ')>=4,subfield(Statement,' '))

Hope it helps you.

Regards,

Khadeer

Not applicable
Author

Hi,

See the attachment.

tresesco
MVP
MVP

try this:

Load

if(len(subfield(trim(Satement),' '))>=4,subfield(trim(Statement),' ')) as NewStatement

Not applicable
Author

Hi Venugopal,

I am using a personal edition. Kindly post the script here

Not applicable
Author

Hi,

TestData:
Load  * Inline [
Statement
I love India
I love World
Community is Best
];


FieldList:
Load * where Len(vSubField) >= 4;

Load
SubField(Statement, ' ') as vSubField
Resident TestData;