Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subselects in Qlik Sense Desktop Formel editor

Hi there,

I already had some related issues with these kind of sorting, but I can't find a way to get this one going.

So here is my Problem:

I've got a list (e.g. a table with the alphabet a-z) and now I want to make a Filterfield wich only contains the letters U,F,O.

I would like to have something like this:

if([IDCode] = U,[IDCode])

or if([IDCode] = F,[IDCode])

or if([IDCode] = O,[IDCode])


but this doesn't seem to work. I just want the list to show these 3 lettern and not grey out all the others.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

=aggr(only({<IDCode={U,F,O}>}IDCode),IDCode)

-Rob

View solution in original post

7 Replies
Chanty4u
MVP
MVP

use wildmatch

Not applicable
Author

Thanks, I've currently set it to something like this:


if(

WILDMATCH([CostCarriers.IdCode],'*KH *')

but I'm getting results with "KH private" too and want to remove them from the list now. is this possible with Wildmatches too?

JonnyPoole
Former Employee
Former Employee

if([IDCode] = U [IDCode] = F or [IDCode] = O,[IDCode])

JonnyPoole
Former Employee
Former Employee

oops..

if([IDCode] = U or [IDCode] = F or [IDCode] = O,[IDCode])

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

=aggr(only({<IDCode={U,F,O}>}IDCode),IDCode)

-Rob

Not applicable
Author

Thank you Rob,

sureshqv's answer works too, but yours is a little bit better, because it only uses one line to select multiple records.

I've set it all up and It only shows the results with U,F and O so that's working as expected.

If I use a wildcard on 'O*' I'm getting OE too. is there a way to exclude records with '*k' ?

OE is ok, but I don't want 'Oak'

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can set up an intersection (*) with a set of exclusions defined by the -= operator. This is a simple way to create an "AND" criteria on the same field.

=aggr(only({<IDCode={U,F,"O*"}> * <IDCode-={"*k"}>}IDCode),IDCode)

Test qvw attached. Oops. Forgot this was Qlik Sense. Sample qvf attached as well.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com