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: 
christophebrault
Specialist
Specialist

Expression in listbox

Hi,

In my app, i have a hierarchy with different level. On a sheet, i want a listbox to show only a part of a field.

For example, in the field i have : A B C D E F G H, in my list box i juste want C D E F.

Is it possible ?

Thanks

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
Labels (1)
1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

HI,

if A, B, C, etc are field values, you can build a list with the following expression (field is F1)

=AGGR(ONLY({<F1={C,D,E}>} F1),F1)

You can check it working in the attachment.


Regards,

Erich

View solution in original post

4 Replies
swuehl
Champion III
Champion III

I think you could use something like:

=right('A B C D E F G H',len('A B C D E F G H')-index('A B C D E F G H',' ',2))

to remove the first two elements from your fields (elements separated by delimiter ' '), or in general

=right(YOURFIELD,len(YOURFIELD)-index(YOURFIELD,' ',2))

Hope this helps,

Stefan

erichshiino
Partner - Master
Partner - Master

HI,

if A, B, C, etc are field values, you can build a list with the following expression (field is F1)

=AGGR(ONLY({<F1={C,D,E}>} F1),F1)

You can check it working in the attachment.


Regards,

Erich

swuehl
Champion III
Champion III

Ah, I missed that you wanted only the middle part, sorry.

So if you are having some kind of string containing the hierarchy levels, maybe like this:

=mid('A B C D E F G H',index('A B C D E F G H',' ',2)+1,index('A B C D E F G H',' ',6)-index('A B C D E F G H',' ',2))

christophebrault
Specialist
Specialist
Author

That's exactly what i wanted.

Thanks a lot,

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin