Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Constraint while using Expression

Hello everyone,

I am in need of help like always

I am trying to add a constraint while I am using an expression. What I want to do is this;

I have a regions which are Aegean, Mediterranean and Marmara. I have the List Box ready but here comes the tricky part. I pull this data from SQL Table of mine and there are other regions other than I mentioned before but I only want to show these regions and filter that way. How will I be able to do that?

1 Solution

Accepted Solutions
Not applicable
Author

write the below expression in list box expression:

if(wildmatch(Region,'Aegean', 'Mediterranean',' Marmara'),Region)

Hope this will help u..!

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Let's suppose that your table name is MYTAB while other tables yet existing are TAB1, TAB2 and so on.

The best thing is to inner join TAB1 and others with your in this way:

Load * resident TAB1;

inner join

Load distinct region resident MYTAB;

In this way you are excluding in all other tables regions not contained inn your table

hope it helps

Not applicable
Author

I understand the main problem is that Region is also in the same table so I won't be able to do that

Not applicable
Author

write the below expression in list box expression:

if(wildmatch(Region,'Aegean', 'Mediterranean',' Marmara'),Region)

Hope this will help u..!

PrashantSangle

Hi,

Try WHERE clause in your  SQL Query.

Like

Select * from tableName

Where region='Aegean' or region='Mediterranean' or region='Marmara'

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

You can write SQL script in ur scripting like;

SQL select * from table_name

wher Region in('Aegean', 'Mediterranean','Marmara');

Not applicable
Author

Thank you, got it to work without doing it in the query

also can I use something like, if I cannot how can I do it? Write a query?

if(wildmatch(Region,'Aegean' as EGE, 'Mediterranean' as Antalya,' Marmara' as Istanbul),Region)