Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
whiteside
Contributor III
Contributor III

One Dimension with multiple conditions

Hello Together,

I am at a Dead End.

Please refer to the pic below.

I have one Element (in this case Shipment No) with Multiple "textcode keys".  You can see that by the Sum I do there (for columns right after the shipment no).

I have troubles to identify if one has more then one. You see in the picutre below i use in row

3 = IF((([Textcode key]='T98' )) ,'YES', 'NO')  --> And it Works

4 = = IF((([Textcode key]='T99' )) ,'YES', 'NO')  --> And it works

so now I tried in 1 and 2 to combine them without success.

First I tried 2 = IF((([Textcode key]='T99')  and ([Textcode key]='T98' )) ,'YES', 'NO')  --> doesn't work, always says no

and then 1 = MaxString( If(([Textcode key] =('T98') AND [Textcode key] =('T99'))  ,Dual('YES', 2),   Dual('no', 1)))

--> doesn't work, always says no

I expected to get "YES" in 1 or 2 but I always get "no".

Ideally I would delete 1 till 4 and have just one dimension that says yes if one or more Textcodes are found. All I need is some variaton of formular 1 or that somehow reflects the combination of 3 AND 4.

I hope you guys understand my needs.

best regards

whiteside

22 Replies
agigliotti
Partner - Master III
Partner - Master III

please mark the answers as helpful or correct if applicable.

thanks.

whiteside
Contributor III
Contributor III
Author

I used the with the WildMatch so I marked yours as Helpful.

Both works. only difference is that the WildMatch always give a result back. Either Yes or No. And your solution will leave the result empty if there is no Attribute (e.g. T99 in the Textcode).

marcel_olmo
Partner - Specialist II
Partner - Specialist II

Hello Whiteside,

there's no an obvious answer here. It depends on several things.

If you do it via App, it's more difficult to get, and you have to control a lot of things via set analysis and/or other syntax options.

If you do it via Script, it's more clean and you can get your new flag dimension available to be clicked in the app.

As you've seen in my example, it works well, and in that little portion of script you can add or delete easily more complex business rules.

Regards, Marcel.