Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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.

Tags (2)
1 Solution

Accepted Solutions

Re: Subselects in Qlik Sense Desktop Formel editor

How about:

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

-Rob

7 Replies
sureshqv
Esteemed Contributor III

Re: Subselects in Qlik Sense Desktop Formel editor

use wildmatch

Not applicable

Re: Subselects in Qlik Sense Desktop Formel editor

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?

Employee
Employee

Re: Subselects in Qlik Sense Desktop Formel editor

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

Employee
Employee

Re: Subselects in Qlik Sense Desktop Formel editor

oops..

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

Re: Subselects in Qlik Sense Desktop Formel editor

How about:

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

-Rob

Not applicable

Re: Subselects in Qlik Sense Desktop Formel editor

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'

Re: Subselects in Qlik Sense Desktop Formel editor

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