Lesson 37 of 49
Dynamic Multi-Condition Filtering with FILTER
Overview & Learning Objectives
The FILTER function extracts rows matching specific conditions dynamically without touching the Data -> Filter menu. When new transactions are logged, the filtered output updates in real time.
- Extract matching records dynamically using `=FILTER(array, include, [if_empty])`.
- Combine multiple conditions using AND logic (`*`) and OR logic (`+`).
- Shield empty search results using the `if_empty` argument to prevent `#CALC!` errors.
Industry Standard
Standard: Modern BI analyst portfolios use FILTER combined with SORT to build real-time interactive dashboards that update automatically when slicers or dropdowns change.
Real-World Example: Salad & Juice Bar Multi-Criteria Filter
At Salad & Juice Bar, the nutritionist wants a live list of all items where Category = "Salad" AND Price <= 200. FILTER pulls the matching dishes instantly into a separate clean reporting area.
| Dish Name | Category | Calories | Price (₹) |
|---|---|---|---|
| Greek Feta Bowl | Salad | 340 | 240 |
| Avocado Crunch | Salad | 280 | 190 |
| Detox Green Juice | Beverage | 110 | 140 |
| Sprout Protein Bowl | Salad | 220 | 180 |
FILTER Function Syntax
=FILTER(array, (Condition1) * (Condition2), "No Records Found")
Parameters Breakdown
array: The source table or columns to return (e.g. A2:D5).include: (Cond1) * (Cond2): Multiplies boolean conditions: `(B2:B5="Salad") * (D2:D5<=200)` for AND logic.[if_empty]: Clean message if no rows qualify (e.g. "No Items Found"). Prevents `#CALC!`.
Sample Walkthrough (Q&A):
Question: Filter our menu for Category = "Salad" AND Price <= 200.
Formula / Action: `=FILTER(A2:D5, (B2:B5="Salad") * (D2:D5<=200), "None")`
Result: Spills 2 rows: Avocado Crunch (₹190) and Sprout Protein Bowl (₹180).
Explanation: Excel checks both conditions row by row; only rows 2 and 4 satisfy both.
Common Mistakes & Limitations
- Omitting the 3rd argument `[if_empty]`, which returns `#CALC!` when no rows match the filter.
- Using the `AND()` function inside FILTER (AND collapses entire arrays into one value; you must use `*` for row-by-row logic).
Keyboard Shortcuts
| Action | Windows | Mac |
|---|---|---|
| Evaluate Filter Condition | Highlight condition -> F9 | Highlight -> F9 |
| Select Spilled Output | Ctrl + Shift + Down | Cmd + Shift + Down |
Pro Tips & Modern Alternatives
- Wrap FILTER in `SORT(...)` to automatically rank the filtered list by price or calories.
- Wrap FILTER in `CHOOSECOLS(FILTER(...), 1, 4)` to extract only Dish Name and Price while hiding other columns.