|
| 1 | +--- |
| 2 | +title: Use Search Operators to Filter and Analyze |
| 3 | +description: Learn how to use search operators, filters, and grouping to find, organize, and analyze expenses, chats, reports, and tasks in Expensify. |
| 4 | +keywords: [New Expensify, search operators, advanced filters, search rules, expense search, report search, chat filters, advanced search, group-by, view, chart, search syntax] |
| 5 | +internalScope: Audience is all Expensify members. Covers search operator syntax for filtering, grouping, and chart views. Does not cover saved search management or Search page UI navigation. |
| 6 | +--- |
| 7 | + |
| 8 | +# Use Search Operators to Filter and Analyze |
| 9 | + |
| 10 | +Search operators let you quickly filter, sort, and group results across expenses, chats, reports, and tasks using powerful text-based queries. These operators work like advanced filters, helping you narrow results, combine conditions, and analyze data directly from the search bar. |
| 11 | + |
| 12 | +This guide walks you through the supported syntax, available filters, and usage tips. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## Who can use search operators in Expensify |
| 17 | + |
| 18 | +Anyone can use search operators when filtering data in features like expenses, reports, chats, and tasks. This is especially helpful for Workspace Admins, accountants, and finance teams looking to analyze or export targeted data. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## How to build a search query with search operators |
| 23 | + |
| 24 | +Use these core rules to create your searches: |
| 25 | + |
| 26 | +- Use `field:value` as the basic format. |
| 27 | +- Use commas for **OR** conditions: `status:drafts,outstanding`. |
| 28 | +- Combine fields for **AND** conditions: `amount>50 status:approved`. |
| 29 | +- Use `-` to exclude results: `-has:receipt`. |
| 30 | +- Use quotes for exact phrases: `description:"team lunch"`. |
| 31 | +- Relative dates are supported: `date:this-week`. |
| 32 | +- Start typing after `:` to see autocomplete suggestions. |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +## How to filter results across expenses, chats, reports, and tasks |
| 37 | + |
| 38 | +Use these operators to refine results across different types: |
| 39 | + |
| 40 | +| **Syntax** | **Description** | **Example** | |
| 41 | +|------------------|-------------------------------------------------------------------------------|------------------------------| |
| 42 | +| `type:` | Filter by object type (`expense`, `chat`, `trip`, `task`) | `type:expense` | |
| 43 | +| `workspace:` | Filter by workspace name (wrap in quotes if the name has spaces) | `workspace:"Acme Inc."` | |
| 44 | +| `from:` | Filter by sender (email, phone, display name, or `me`) | `from:alice@acme.com` | |
| 45 | +| `to:` | Filter by recipient (email, phone, display name, or `me`) | `to:me` | |
| 46 | + |
| 47 | +**Note:** Quotes are required when filtering by names with spaces, such as `workspace:"Sales Team"`. |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +## How to filter expenses using search operators |
| 52 | + |
| 53 | +You can use the following operators to filter expenses: |
| 54 | + |
| 55 | +- `merchant:` – expense merchant name |
| 56 | +- `category:` – expense category label |
| 57 | +- `tag:` – tag or multiple tags |
| 58 | +- `amount:` / `purchase-amount:` – supports `=`, `>`, `<`, `>=`, `<=` |
| 59 | +- `status:` – unreported, draft, outstanding, approved, paid, done |
| 60 | +- `date:` – expense date, supports relative dates like `date:this-month`, `date:last-month`, `date:year-to-date`, `date:this-week`. Also supports comparisons (`date>=2024-01-01 date<=2024-01-31`) for date ranges |
| 61 | +- `has:` – attachment, receipt, category, tag |
| 62 | +- `expense-type:` – cash, card, distance, per-diem |
| 63 | +- `reimbursable:` and `billable:` – yes or no |
| 64 | +- `attendee:` – expense attendees, e.g. `attendee:"Jason Mills"` |
| 65 | +- `posted:` – credit card posted date, e.g. `posted:last-statement` |
| 66 | + |
| 67 | +**Example query:** |
| 68 | +`type:expense merchant:Starbucks category:Meals amount>20 has:receipt` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## How to filter reports using search operators |
| 73 | + |
| 74 | +You can use the following operators to filter reports: |
| 75 | + |
| 76 | +- `report-id:` – unique report reference |
| 77 | +- `status:` – draft, outstanding, approved, paid, done |
| 78 | +- `submitted:` / `approved:` / `paid:` / `exported:` – supports absolute or relative dates, and comparisons for date ranges (e.g., `submitted>=2024-01-01 submitted<=2024-01-31`) |
| 79 | +- `title:` – report title |
| 80 | +- `total:` – total amount with relative comparisons |
| 81 | +- `withdrawn:` – ACH withdrawal date |
| 82 | +- `withdrawal-type:` – reimbursement or expensify-card |
| 83 | +- `action:` – blocking report action, e.g. `action:approve` |
| 84 | + |
| 85 | +**Example query:** |
| 86 | +`status:paid exported<=2026-01-01` |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## How to filter chats using search operators |
| 91 | + |
| 92 | +You can use the following operators to filter chats: |
| 93 | + |
| 94 | +- `in:` – channel name or DM |
| 95 | +- `has:` – attachment, link |
| 96 | +- `is:` – unread, read, pinned |
| 97 | +- `date:` – message timestamp |
| 98 | + |
| 99 | +**Example query:** |
| 100 | +`type:chat in:"Concierge" is:unread` |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +## How to filter tasks using search operators |
| 105 | + |
| 106 | +You can use the following operators to filter tasks: |
| 107 | + |
| 108 | +- `assignee:` – assigned member |
| 109 | +- `status:` – outstanding, completed |
| 110 | +- `description:` – task description |
| 111 | +- `title:` – task title |
| 112 | +- `in:` – channel name or DM for tasks |
| 113 | + |
| 114 | +**Example query:** |
| 115 | +`type:task assignee:"Charlie Brown" status:outstanding` |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## How to group and visualize results using search operators |
| 120 | + |
| 121 | +Use these operators to analyze and visualize your results: |
| 122 | + |
| 123 | +- `group-by:` groups results by a specific dimension |
| 124 | +- `view:` controls how grouped results are displayed |
| 125 | +- `group-currency:` converts totals into a single currency |
| 126 | + |
| 127 | +**Normalize totals using `group-currency:`** |
| 128 | + |
| 129 | +Use `group-currency:` to convert all grouped amounts into a single currency for easier comparison. This is helpful when your data includes multiple currencies. |
| 130 | + |
| 131 | +Supported values include standard ISO currency codes such as: |
| 132 | +- `USD` |
| 133 | +- `EUR` |
| 134 | +- `GBP` |
| 135 | +- `CAD` |
| 136 | +- `AUD` |
| 137 | + |
| 138 | +**Example search:** |
| 139 | +`type:expense group-by:category group-currency:USD` |
| 140 | + |
| 141 | +--- |
| 142 | + |
| 143 | +**Group results by dimension** |
| 144 | + |
| 145 | +Supported grouping options include: |
| 146 | + |
| 147 | +- `group-by:report` – Group by report |
| 148 | +- `group-by:from` – Group by submitter |
| 149 | +- `group-by:card` – Group by card |
| 150 | +- `group-by:withdrawal-id` – Group by withdrawal ID |
| 151 | +- `group-by:merchant` – Group by merchant |
| 152 | +- `group-by:category` – Group by category |
| 153 | +- `group-by:tag` – Group by tag |
| 154 | +- `group-by:month` – Group by month |
| 155 | +- `group-by:week` – Group by week |
| 156 | +- `group-by:quarter` – Group by quarter |
| 157 | +- `group-by:year` – Group by year |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## How to choose a chart view for grouped results |
| 162 | + |
| 163 | +When using `group-by:`, you can add `view:` to control the visualization type. |
| 164 | + |
| 165 | +Supported views: |
| 166 | + |
| 167 | +- `view:table` - table (default) |
| 168 | +- `view:bar` - bar chart |
| 169 | +- `view:pie` - pie chart |
| 170 | +- `view:line` - line chart |
| 171 | + |
| 172 | +> **Note:** The `view:` operator only applies when `group-by:` is also used. Without `group-by:`, the `view:` value is ignored. |
| 173 | +
|
| 174 | +--- |
| 175 | +## How to build reports using search operators |
| 176 | + |
| 177 | +You can create report-style views similar to Insights by combining filters, grouping, date ranges, and chart views. |
| 178 | + |
| 179 | +Here are some common examples: |
| 180 | + |
| 181 | +- **Top categories (bar chart)** |
| 182 | + `type:expense group-by:category date:last-month view:bar` |
| 183 | + |
| 184 | +- **Top spenders (table)** |
| 185 | + `type:expense group-by:from date:last-month view:table` |
| 186 | + |
| 187 | +- **Spend over time (line chart)** |
| 188 | + `type:expense group-by:month date:year-to-date view:line` |
| 189 | + |
| 190 | +- **Last month category breakdown (pie chart)** |
| 191 | + `type:expense group-by:category date:last-month view:pie` |
| 192 | + |
| 193 | +- **Custom date range (table)** |
| 194 | + `type:expense date>=2026-01-01 date<=2026-01-31 group-by:category view:table` |
| 195 | + |
| 196 | +These searches update in real time and can be refined further using additional filters. You can save frequently used searches to reuse them later by clicking **Save search** in the search bar. |
| 197 | + |
| 198 | +For more advanced dashboards and exports, learn how to use [Insights in Expensify](/articles/new-expensify/insights/How-to-Use-Insights-in-Expensify). |
| 199 | + |
| 200 | +--- |
| 201 | +# FAQ |
| 202 | + |
| 203 | +## Can I combine filters from different types? |
| 204 | + |
| 205 | +Yes, but only when they make sense together. For example, combining `type:expense` with `merchant:` and `amount:` works, but mixing in `assignee:` (a task filter) won’t return results. |
| 206 | + |
| 207 | +## What happens if I enter an invalid operator? |
| 208 | + |
| 209 | +If the search operator isn’t recognized, the system will ignore it and return results based on any valid parts of the query. |
| 210 | + |
| 211 | +## Do I need to use quotes for everything? |
| 212 | + |
| 213 | +Only use quotes for values that include spaces or exact phrases, like `description:"client lunch"` or `in:"#general"`. |
| 214 | + |
0 commit comments