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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Substring

Hi,

I have a question, i have a field that has the value like 'Hilary/12yo' i want to separate this data into two fields, let's say Name and Age. i want to cut the value when meet the '/' symbol and put 'Hilary' into Name field and put '12yo' into Age field. Does anybody know the function to separate the value ?

Really need your help, your comments and view are really appreciated.

Thanks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

If you are trying to do it in script, you can try this:


LOAD Fields,

          SubField(YourField, '/', 1) as Name,

          SubField(YourField, '/', 2) as Age,

From abc

HTH

Best,

Sunny

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

If you are trying to do it in script, you can try this:


LOAD Fields,

          SubField(YourField, '/', 1) as Name,

          SubField(YourField, '/', 2) as Age,

From abc

HTH

Best,

Sunny

sunny_talwar
MVP
MVP

Attaching a sample for reference.

Capture.PNG

Not applicable
Author

Hi Sunindia,

Thanks for your help. It works and solve my problem.