7 Replies Latest reply on Dec 4, 2013 4:28 PM by brant wu

# Logical relationship of filters

Is it possible that the logical relationship of two filters for a report is "OR"

• ###### 1. Re: Logical relationship of filters

Can you explain what you are trying to accomplish in some more detail?  As always, a packaged workbook with some sample data would be most helpful in understanding your scenario--I'd suggest posting a workbook and explain what it is you would like to see as an end result.  Depending on what you are trying to do, there may be a variety of ways to get the result you are after.  Cheers.

• ###### 2. Re: Re: Logical relationship of filters

Hi Matthew:

I attach a workbook ,the report containing two filters Brand: Cocacola ,Category:Sparking

and the result is

Brand       category        sales

Cocacola   Sparking          100

How can I get the result for Brand =Cocacola Or Category =Sparking  it should be

Brand     category      Sales

Cocacola   Sparking          100

Cocacola   Tea                  200

Pepsi         Sparking         300

• ###### 3. Re: Re: Logical relationship of filters

You can use action filters to accomplish this type of filtering--I'll upload an example in a moment.  I'm sure a parameter could be set up to filter in this way, as well.

I was able to set up an action filter to get the results you want, but I don't think it is an ideal solution so I won't post it here (believe me, it was no good).

I'll let someone else take a stab at this--I know it can be done, but I cannot think through it right now evidently.

1 of 1 people found this helpful
• ###### 4. Re: Logical relationship of filters

Hi Brant,

As Matthew said, parameters are probably your best bet here. I've attached a workbook which shows the results you want. Essentially, you create two parameters, one fore brand and one for category. Then you create a calculated field to act as your filter;

IF [BrandParameter] = [Brand] THEN 'True'

ELSEIF [CategoryParameter] = [Category] THEN 'True'

ELSE 'False'

END

Does this work for you as an answer?

• ###### 5. Re: Logical relationship of filters

Very nice, I don't know why I couldn't wrap my brain around this.  Thanks for posting the solution!

• ###### 6. Re: Logical relationship of filters

No problem - I happened to be doing this today and saw the post!

• ###### 7. Re: Logical relationship of filters

Hi Chris:

I got it ,many thanks!