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

How to create an "OR" filter

Please help!

I like to create a filter with OR relationship built in ...

if I choose name = "ABC" then will give me sales personal name = "ABC" or engineer name ="ABC"

thanks!

11 Replies
ziadm
Specialist
Specialist

Hi

user on action trigger to set the field value by going to

Settings --->Document Properties Then go to Field Event Trigger and click Add Actions under <On Select> option.

This where you can add action such as setting field values if any of the fields selected

1.png

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It usually makes sense to just load the SalesPerson and Engineer names into a common field called "Name" and let the user select from that.

-Rob

Not applicable
Author

Thanks for the suggestion .. I Might need a bit more details to know how this works ...

I like to use list box to be the filter and choose the name "ABC" then it will filter out the following charts (tables) with 3 columns:

1) sales person name;

2) engineer name;

3) manager name

after I chose ABC then the table will show me either sales person name = "ABC" or engineer name = "ABC" or manager name = "ABC" ...

hope this help .. THANKS! have a great friday

Not applicable
Author

Thanks for the suggestion .. I Might need a bit more details to know how this works ...

I like to use list box to be the filter and choose the name "ABC" then it will filter out the following charts (tables) with 3 columns:

1) sales person name;

2) engineer name;

3) manager name

after I chose ABC then the table will show me either sales person name = "ABC" or engineer name = "ABC" or manager name = "ABC" ...

hope this help .. THANKS! have a great friday

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How is your data structured?  Are SalesPerson, Engineer and Manager in same or different table?  If the same table, are they filled in for every row?  Can you post a picture of your table model?

-Rob

Not applicable
Author

Hi Rob,

Thanks for the reply. Here is an data example for this question. Hope this help to make it clear.

so we like to have a selection filter based on customer table to filter the order table .. but filtering all the rows with billto or payer or shipto = customer5

Anonymous
Not applicable
Author

just use set analysis:

(and explain the users how to use it )

expression could look similar like that:

count(

{

        < BILLTO= P({< PAYER=,SHIPTO= >} SELECTOR)  >

     + < PAYER= P({< BILLTO=,SHIPTO= >} SELECTOR)  >

     + < SHIPTO=P({< PAYER=,BILLTO=  >} SELECTOR)   >

}   ORDERS)

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Set analysis might work. Another approach would be to bake this into the script.

CustomerRole:

LOAD Distinct ORDERS, BILLTO as SELECTOR Resident Detail;

LOAD Distinct ORDERS, PAYER as SELECTOR Resident Detail;

LOAD Distinct ORDERS, SHIPTO as SELECTOR Resident Detail;


Then a selection on the SELECTOR field will link to all associated ORDERS rows.


-Rob

http://masterssummit.com

http://qlikviewcookbook.com


Anonymous
Not applicable
Author

I'd rather use the Search Object for this than a list box.  In the properties, use Selected Fields,  and add the fields you want to search.