Introduction to Azure Boards Queries
Queries are fundamental to effectively managing your work items in Azure Boards. They allow you to filter, sort, and group work items based on specific criteria, enabling you to gain insights into your project's progress, identify bottlenecks, and ensure that no task falls through the cracks.
Whether you're tracking bugs, user stories, tasks, or any other work item type, well-crafted queries are your best friend for maintaining visibility and control.

Creating Your First Query
Creating a new query in Azure Boards is a straightforward process. You can start from scratch or use a pre-defined template.
- Navigate to the Queries hub in your Azure DevOps project.
- Click the New Query button.
- This will open the Query Editor, where you'll define your criteria.
Using the Query Editor
The Query Editor is your interface for building powerful queries. It consists of three main panes:
- Query lines: Define the conditions for your query. Each line specifies a field, an operator, and a value.
- Results pane: Displays the work items that match your query criteria.
- Parameters (Optional): Allows for dynamic query execution.
You can add multiple clauses to refine your search. Use AND to require all conditions to be met, and OR to allow any of the conditions to be met.

Commonly Used Fields
Understanding the available fields is key to writing effective queries. Some of the most frequently used fields include:
- Work Item Type: Filter by specific types like Bug, User Story, Task, etc.
- State: Track items by their current status (e.g., New, Active, Resolved, Closed).
- Assigned To: Find work assigned to a particular team member.
- Area Path: Filter by team or functional area.
- Iteration Path: Filter by sprint or iteration.
- Title: Search for work items by their title.
- Tags: Filter based on applied tags.
Query Operators
Operators determine how the value is compared to the field. Common operators include:
- = (Equals)
- <> (Not Equals)
- > (Greater Than)
- < (Less Than)
- >= (Greater Than or Equal To)
- <= (Less Than or Equal To)
- Contains
- Does Not Contain
- In (Matches any value in a list)
- Under (For hierarchical fields like Area Path)
For example, to find all active user stories, you might use:
Field: Work Item Type
Operator: =
Value: User Story
---
Field: State
Operator: =
Value: Active
Saving and Sharing Queries
Once you've crafted a query that meets your needs, you can save it for future use.
- Click the Save Query button.
- Provide a descriptive name and choose a folder (e.g., "My Queries", "Team Queries").
- To share, ensure the query is saved in a shared folder and that team members have the necessary permissions to view it.
Queries saved under "Shared Queries" are accessible to all members of the project.
Understanding Query Results
The results pane shows a table of work items matching your criteria. You can:
- Sort: Click on column headers to sort the results.
- Add Columns: Customize the visible columns by clicking Add/Remove Columns.
- Edit Inline: Double-click a cell to quickly edit a work item's field.
- Drill Down: Click a work item ID to open its full details page.
Visualizing Results with Charts and Dashboards
Transform your query results into visual insights by creating charts. These charts can be added to dashboards for a comprehensive project overview.
- From the query results page, click Charts.
- Select a chart type (e.g., Pie Chart, Bar Chart) and configure its settings based on your query results.
- Save the chart and add it to a dashboard for easy access and monitoring.