Is it possible to make my conditions in Filter Formula with both AND and OR (the condition for OR is multiple and dynamic)?
For example, I have a table:
Now in this data sample, I'm trying to use the Filter Formula where I can include items using both AND conditions and OR conditions.
I know how to use Multiple AND conditions [(X="value")*(Y="value2")*...], and OR conditions [(X = "value1")+(Y = "value 2") + ...], I just haven't had the opportunity to use both at the same time.
In this example, let's say I want to filter out all fruits, but I want to filter out all fruits in varying Year and Month (my data set will possibly have same type but will have singular or multiple months/years). My reference for the varying part is a text string of years/months separated by a comma (",") (i.e., 2023,2024,2025...; Jan,Feb,Mar...).
Input Values:
Sample 1:
Year: 2023,2024,2025
Type: Fruit
Month: Jan
Result should be Item 1, Item 2, and Item 3. The OR part comes in at the Year condition, while the AND part comes in at the Month (Mar) and Type (Fruit).
Sample 2:
Year: 2023
Type: Fruit
Month: Jan,Mar
Result should be Item 1, and Item 5. The OR part comes in at the Month (January OR March), while the AND part comes in at the Year (2023) and Type (Fruit).
I apologize in advance if I'm overthinking this or something along those lines, or if I didn't make my question clear. This is the first forum I've ever been in and I already appreciate everything I have seen here before. LOL
For example, I have a table:
Description | Year | Month | Type |
Item 1 | 2023 | Mar | Fruit |
Item 2 | 2024 | Mar | Fruit |
Item 3 | 2025 | Mar | Fruit |
Item 4 | 2024 | Mar | Vegetable |
Item 5 | 2023 | Jan | Fruit |
Item 6 | 2024 | Jan | Fruit |
Item 7 | 2025 | Jan | Fruit |
Item 8 | 2024 | Jan | Vegetable |
Now in this data sample, I'm trying to use the Filter Formula where I can include items using both AND conditions and OR conditions.
I know how to use Multiple AND conditions [(X="value")*(Y="value2")*...], and OR conditions [(X = "value1")+(Y = "value 2") + ...], I just haven't had the opportunity to use both at the same time.
In this example, let's say I want to filter out all fruits, but I want to filter out all fruits in varying Year and Month (my data set will possibly have same type but will have singular or multiple months/years). My reference for the varying part is a text string of years/months separated by a comma (",") (i.e., 2023,2024,2025...; Jan,Feb,Mar...).
Input Values:
Sample 1:
Year: 2023,2024,2025
Type: Fruit
Month: Jan
Result should be Item 1, Item 2, and Item 3. The OR part comes in at the Year condition, while the AND part comes in at the Month (Mar) and Type (Fruit).
Sample 2:
Year: 2023
Type: Fruit
Month: Jan,Mar
Result should be Item 1, and Item 5. The OR part comes in at the Month (January OR March), while the AND part comes in at the Year (2023) and Type (Fruit).
I apologize in advance if I'm overthinking this or something along those lines, or if I didn't make my question clear. This is the first forum I've ever been in and I already appreciate everything I have seen here before. LOL