Hi
How do I set up a dropdown filter for two fields that can be set to OR or AND depending on the reader’s needs?
Andrea
Hi
How do I set up a dropdown filter for two fields that can be set to OR or AND depending on the reader’s needs?
Andrea
Hi @andreab
You can’t choose.
But if you keep one filter to all and only set the other one or us both you will a achieve the same, right?
BR
Hi @ErikG
In practice, our readers have access to a table where they can filter our CRM database users. Usually, however, they proceed by filtering both the employee size and the company revenue range, either using the OR logic or the AND logic. The only thing that comes to my mind is to add both filters in OR and both filters in AND.
Because if I only use OR, taking the following example:
I want the contacts of companies with more than 50 employees AND 10 million in revenue. In this case, I will take both all the companies with more than 50 employees and all the companies with 10 million in revenue. This is not correct.
The same issue arises in reverse. If I set them only in AND but have cases that need to be handled in OR, I’ll encounter the same problem. I can’t see any other solution beyond giving the readers 4 filters (2 in OR and 2 in AND).
Maybe it will go with 3 parameter as well. 2 criteria and 1 option (AND/OR)
Then create a calculated field and filter on that field.
Something like
Ifelse(param3 = "AND", number_emp>param1 AND revenue = param3,1,param3 = "OR", number_emp>param1 OR revenue = param3,1,0))
@ErikG Okay, I’ll try with this solution. I also thought that I could use the free form, create a parameter with OR and AND logic, and show or hide the visuals based on this parameter
yes, thats an option or combination too