Select, Filter, and Aggregate Data by Using the Visual Query Editor

This post is a part of the DP-600: Implementing Analytics Solutions Using Microsoft Fabric Exam Prep Hub; and this topic falls under these sections: 
Prepare data
--> Query and analyze data
--> Select, Filter, and Aggregate Data by Using the Visual Query Editor

In Microsoft Fabric, the Visual Query Editor (VQE) provides a low-code, graphical experience for querying data across lakehouses, warehouses, and semantic models. It allows analytics engineers to explore, shape, and summarize data without writing SQL or KQL, while still generating optimized queries behind the scenes.

For the DP-600 exam, you should understand what the Visual Query Editor is, where it’s used, and how to perform common data analysis tasks such as selecting columns, filtering rows, and aggregating data.


What Is the Visual Query Editor?

The Visual Query Editor is a graphical query-building interface available in multiple Fabric experiences, including:

  • Lakehouse SQL analytics endpoint
  • Warehouse
  • Power BI (Direct Lake and DirectQuery scenarios)
  • Data exploration within Fabric items

Instead of writing queries manually, you interact with:

  • Tables and columns
  • Drag-and-drop operations
  • Menus for filters, grouping, and aggregations

Fabric then translates these actions into optimized SQL or engine-specific queries.


Selecting Data

Selecting data in the Visual Query Editor focuses on choosing the right columns and datasets for analysis.

Key Capabilities

  • Select or deselect columns from one or more tables
  • Rename columns for readability
  • Reorder columns for analysis or reporting
  • Combine columns from related tables (via existing relationships)

Exam Tips

  • Selecting fewer columns improves performance and reduces data transfer.
  • Column renaming in VQE affects the query result, not the underlying table schema.
  • The Visual Query Editor respects relationships defined in semantic models and warehouses.

Filtering Data

Filtering allows you to limit rows based on conditions, ensuring only relevant data is included.

Common Filter Types

  • Equality filters (e.g., Status = "Active")
  • Range filters (e.g., dates, numeric thresholds)
  • Text filters (contains, starts with, ends with)
  • Null / non-null filters
  • Relative date filters (last 7 days, current month)

Where Filtering Is Applied

  • At the query level, not permanently in the data source
  • Before aggregation (important for correct results)

Exam Tips

  • Filters applied in the Visual Query Editor are executed at the data source when possible (query folding).
  • Filtering early improves performance and reduces memory usage.
  • Be aware of how filters interact with aggregations.

Aggregating Data

Aggregation summarizes data by grouping rows and applying calculations.

Common Aggregations

  • Sum
  • Count / Count Distinct
  • Average
  • Min / Max

Grouping Data

  • Select one or more columns as group-by fields
  • Apply aggregations to numeric or date columns
  • Results return one row per group

Examples

  • Total sales by product category
  • Count of orders per customer
  • Average response time by day

Exam Tips

  • Aggregations in the Visual Query Editor are conceptually similar to GROUP BY in SQL.
  • Aggregated queries reduce dataset size and improve performance.
  • Understand the difference between row-level data and aggregated results.

Behind the Scenes: Generated Queries

Although the Visual Query Editor is low-code, Fabric generates:

  • SQL queries for warehouses and lakehouse SQL endpoints
  • Optimized engine-specific queries for semantic models

This ensures:

  • Efficient execution
  • Compatibility with Direct Lake and DirectQuery
  • Consistent results across Fabric experiences

Exam Tip

You are not required to read or write the generated SQL, but you should understand that the Visual Query Editor does not bypass query optimization.


When to Use the Visual Query Editor

Use the Visual Query Editor when:

  • Quickly exploring unfamiliar datasets
  • Building queries without writing code
  • Creating reusable query logic for reports
  • Teaching or collaborating with less SQL-focused users

Avoid it when:

  • Complex transformations are required (use SQL, Spark, or Dataflows)
  • Highly customized logic is needed beyond supported operations

Key Exam Takeaways

For the DP-600 exam, remember:

  • The Visual Query Editor is a graphical query-building tool in Microsoft Fabric.
  • It supports selecting columns, filtering rows, and aggregating data.
  • Operations are translated into optimized queries executed at the data source.
  • Filtering occurs before aggregation, affecting results and performance.
  • It is commonly used with lakehouses, warehouses, and semantic models.

Practice Questions:

Here are 10 questions to test and help solidify your learning and knowledge. As you review these and other questions in your preparation, make sure to …

  • Identifying and understand why an option is correct (or incorrect) — not just which one
  • Look for and understand the usage scenario of keywords in exam questions to guide you
  • Expect scenario-based questions rather than direct definitions
  • Know the purpose and scope of the Visual Query Editor
  • Know how to selecting, filtering, and aggregating data
  • Understand execution order and performance implications
  • Know when to use (and not use) the Visual Query Editor

Question 1

What is the primary purpose of the Visual Query Editor in Microsoft Fabric?

A. To permanently modify table schemas
B. To build queries visually without writing SQL
C. To replace semantic models
D. To manage workspace permissions

Correct Answer: B

Explanation:
The Visual Query Editor provides a low-code, graphical interface for building queries. It does not modify schemas, replace models, or manage security.


Question 2

When you deselect a column in the Visual Query Editor, what happens?

A. The column is deleted from the source table
B. The column is hidden permanently for all users
C. The column is excluded only from the query results
D. The column data type is changed

Correct Answer: C

Explanation:
Column selection affects only the query output, not the underlying data or schema.


Question 3

Why is it considered a best practice to select only required columns in a query?

A. It enforces data security
B. It reduces query complexity and improves performance
C. It enables Direct Lake mode
D. It prevents duplicate rows

Correct Answer: B

Explanation:
Selecting fewer columns reduces data movement and memory usage, leading to better performance.


Question 4

Which type of filter is commonly used to restrict data to a recent time period?

A. Equality filter
B. Text filter
C. Relative date filter
D. Aggregate filter

Correct Answer: C

Explanation:
Relative date filters (e.g., “Last 30 days”) dynamically adjust based on the current date and are commonly used in analytics.


Question 5

At what stage of query execution are filters applied in the Visual Query Editor?

A. After aggregation
B. After the query result is returned
C. Before aggregation
D. Only in the Power BI report layer

Correct Answer: C

Explanation:
Filters are applied before aggregation, ensuring accurate summary results and better performance.


Question 6

Which aggregation requires grouping to produce meaningful results?

A. SUM
B. COUNT
C. GROUP BY
D. MIN

Correct Answer: C

Explanation:
Grouping defines how rows are summarized. Aggregations like SUM or COUNT rely on GROUP BY logic to produce per-group results.


Question 7

You want to see total sales by product category. Which Visual Query Editor actions are required?

A. Filter Product Category and sort by Sales
B. Group by Product Category and apply SUM to Sales
C. Count Product Category and filter Sales
D. Rename Product Category and aggregate rows

Correct Answer: B

Explanation:
This scenario requires grouping on Product Category and applying a SUM aggregation to the Sales column.


Question 8

What happens behind the scenes when you build a query using the Visual Query Editor?

A. Fabric stores a cached dataset only
B. Fabric generates optimized SQL or engine-specific queries
C. Fabric converts the query into DAX
D. Fabric disables query folding

Correct Answer: B

Explanation:
The Visual Query Editor translates visual actions into optimized queries (such as SQL) that execute at the data source.


Question 9

Which Fabric items commonly support querying through the Visual Query Editor?

A. Pipelines and notebooks only
B. Dashboards only
C. Lakehouses, warehouses, and semantic models
D. Eventhouses only

Correct Answer: C

Explanation:
The Visual Query Editor is widely used across lakehouses, warehouses, and semantic models in Fabric.


Question 10

When should you avoid using the Visual Query Editor?

A. When exploring new datasets
B. When building quick aggregations
C. When complex transformation logic is required
D. When filtering data

Correct Answer: C

Explanation:
For advanced or complex transformations, SQL, Spark, or Dataflows are more appropriate than the Visual Query Editor.


One thought on “Select, Filter, and Aggregate Data by Using the Visual Query Editor”

Leave a comment