Once there’s at least one filter added to the Filters section in Interactive Mode, an OR button will appear below the Filter box. If you’d like your results to fit all filter conditions, add subsequent filters to the same Filters box. Any filters in this same field will have an AND operator between them.
If you’d like your chart to include results fitting different conditions, you’ll want to add them to a different Filters field using an OR filter. To do this, click the OR button and drag your column to the new Filters field.
Once you drag a column to the OR filter field, another OR button will appear beneath it. You may add as many OR boxes as you need this way.
1. Our query results will include rows matching any of the following conditions:
- The Description contains the word “Ad” and “Event”. These can be in any part of the string as the wildcards (%) are placed before and after the terms;
- The Description contains the word “Web”;
- The Cost is more than 100.
where Description like '%Ad%' and Description like '%Event%' or Description like '%Web%' or Cost > 100;
2. Our query results will include rows matching any of the following conditions:
- The Description is null;
- The Description is not “Sales” and is not “Print”.
where Description is null or Description not in ('Sales', 'Print');
3. Our query results will include rows matching any of the following conditions:
- The Cost is greater than 100 and the Description includes the words “Event”;
- The Cost is greater than 100 and the Description is not null.
where Cost > 100 and (Description like '%Event%' or Description is null)
Because each section has an OR between it, we’ll need to do something a little different to get this to work in Interactive Mode: we’ll add our AND filter for Cost to both OR sections. This will ensure that only results that have a Cost of more than 100 AND either Description options will be included.
In SQL Mode, you can simply wrap the two OR options in parentheses to get the same results.