How do and's and or's work in filters?

I need to use multiple filters at the same time. What are the priorities of the and's and or's? 


i.e. If I use the following filters:


customer ID = A

or customer ID = B

and campaign ID <> X


does the campaign ID filter act as a subset of the customer ID = B filter or does it apply to both of the previous filters?  


Does it work like:

(customer ID = A) or (customer ID = B and campaign ID <> X)

or like 

(customer ID = A or customer ID = B) and (campaign ID <> X)


Thanks!

  • Hi Mark,

    When I tested it to confirm, it appears that the 3rd case applies to both previous filters. So:

    (customer ID = A or customer ID = B) and (campaign ID <> X)


    -Thank you

    Supermetrics Query

  • OK, thanks. I'll test that out. 


    It sounds like you're saying the ORs attach only to the previous condition.

  • I know this is a very old threat but how can I change the prioritization of the filters myself?

    Could you, for example, use brackets to group filters within the SupermetricsQueries Sheet?

  • Hi Marijn,


    Sadly, it's not really possible. The most control you have is over the stacked order of the filters, but there's currently no proper way to group them. I did add a feature request 3 years ago into our system to look into better filtering handling including bracketing, but it's never been a priority.


    We do have another way to post feature requests, it might be worth pitching the idea over there and seeing if others in the community agree. It could be way to bring more attention and raise the priority: https://supermetrics.upvoty.com/b/new-features-to-ds-gs-or-excel/


    -Thank you
    Supermetrics

Login to post a comment