Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

How to get a Subfield of the last N elements?

Here is my challenge :

Imagine you have the following string :

vItemOpts = 'fieldname1;fieldname2;fieldname3'

And I do the following sentence :

=SubField(vItemOpts, ';')

This will return 3 strings : fieldname1, fieldname2 and fieldname3.

In my case I want to return all of them except the first one, so my desired result would be only : fieldname2 and fieldname3.

What can I do that in a dynamic way? because the variable vItemOpts could have many other values.

Many thanks in advance.

Regards.

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Maybe this?

subfield(mid(vItemOpts,index(vItemOpts,';')+1),';')

View solution in original post

2 Replies
johnw
Champion III
Champion III

Maybe this?

subfield(mid(vItemOpts,index(vItemOpts,';')+1),';')

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thank you very much John, once more. That was exactly what I was looking for.

See you around.

Regards.