How To Define Governance Ready Queries Using Query Builder

How To Define Governance Ready Queries Using Query Builder

Dashboards do not create insight.
Queries do.

If a query is loosely defined, the dashboard becomes misleading.
If a query is structured and governed, the dashboard becomes reliable.

Query Builder helps you translate governance questions into structured logic that can be reused consistently across reviews.

Step-by-Step Guide

Step 1: Create a New Query

  1. Navigate to Queries
  2. Click New Query

Step 2: Define the Data Scope

Before adding logic, define what data you are analysing.

Ask:

  • Which project is being reviewed?
  • Which work items are relevant?

For a Weekly Health Review, typically include:

  • Project Plan items
  • Issues
  • Risks
  • Sign-offs

In Query Builder:

  • Select the Project
  • Select the appropriate Work Item Type

This ensures the query is grounded in execution data.

Step 3: Select the Core Entity

For most PMO reviews, the primary anchor should be:

Project Plan / Integrated Master Plan

Why?

  • It reflects committed work
  • It defines timelines
  • It represents delivery status

In Query Builder:

  • Choose Work Item Type = Project Plan

Anchoring to the plan ensures insights reflect delivery reality.

Step 4: Define Governance Conditions

Conditions determine what qualifies as something that needs attention.

Click Insert New Filter Line and define structured rules.

Example: Overdue Open Plan Items

  • Status is not Completed
  • Planned End Date is before Today

You can combine multiple conditions using:

  • AND – All conditions must be true
  • OR – Any condition can be true

Example logic:

Status ≠ Completed
AND
Planned End Date < Today

This isolates items that are both open and overdue.

This is where governance logic is applied.

Step 5: Refine with Filter Lines

Filters help adjust the view without changing core logic.

Use filters to:

  • Focus on specific phases
  • Review a particular workstream
  • Analyse owner-specific data
  • Narrow down results during review meetings

Filters make the same query usable across multiple discussions.

Step 6: Run and Validate Before Saving

Before saving:

  1. Run the Query
  2. Review the Results View
  3. Check if the output matches your intent
  4. Confirm that irrelevant records are excluded

Governed queries must always be validated before reuse.

Step 7: Save and Configure Access

Once validated:

  1. Click Save

Saved queries can now be connected directly to dashboards.

Practical Weekly Health Example

A structured weekly health query may surface:

  • Open plan items past expected dates
  • Issues marked as blocking
  • Risks with high impact ratings

Instead of manually compiling these every week:

Define once → Save → Reuse → Connect to dashboards

This creates consistency and reduces manual reporting effort.

Important Practice: Data Must Be Updated

Query Builder retrieves live project data.

If project teams do not update:

  • Status
  • Dates
  • Ownership
  • Risk

The dashboard will reflect inaccurate information.

Real-time dashboards require real-time execution updates.

Day-to-day data discipline is essential.

Key Takeaway

Defining a query is not just a technical activity.

It is a governance decision.

When queries are structured correctly:

  • Dashboards become reliable
  • Reviews become focused
  • Conversations shift from validation to decision-making