Skip to content

Rolling records up with group-by aggregations

In Microsoft Fabric, grouping and aggregating data is a core transformation step used to summarize datasets by one or more columns, typically producing counts, sums, averages, or other statistical results. This can be accomplished through Power Query's Group By feature in Dataflows Gen2 and Data Pipelines, through Spark DataFrame operations (groupBy/agg) in Notebooks, or via SQL GROUP BY clauses in the Lakehouse SQL endpoint or Warehouse. Choosing the right tool depends on the ingestion pattern (low-code vs. code-first) and where the transformation logically fits in the medallion architecture.

Must-know

  • Power Query's Group By dialog lets you group by one or more columns and apply aggregations (Sum, Average, Count, Min, Max, etc.) without writing code, and it generates an M query step behind the scenes.
  • In Power Query, you can choose 'Basic' or 'Advanced' grouping mode; Advanced allows multiple group-by columns and multiple aggregated output columns in a single step.
  • In Spark notebooks, groupBy() combined with agg() (or shorthand functions like sum(), count(), avg()) creates a new DataFrame with aggregated results, and results are lazily evaluated until an action is called.
  • When aggregating in SQL (Lakehouse SQL endpoint or Warehouse), every non-aggregated column in the SELECT list must appear in the GROUP BY clause, or the query will error.
  • A common gotcha: grouping and aggregating early in a pipeline (bronze/silver) can improve downstream performance, but doing so too early may cause loss of granular data needed for later transformations or auditing.
  • Aggregations performed in Dataflows Gen2 are computed within the Power Query mashup engine, which may have different performance characteristics than pushing aggregation logic down to Spark or the SQL engine for large-scale data.
Check this objectiveFree · always available

A data engineer is building a Dataflow Gen2 in Fabric to summarize an orders table. In the Group By transformation, they need to group by Region and, in the same step, calculate the total revenue (sum), the number of orders (count), and the most recent order date (max) for each region. Which approach in the Group By dialog achieves this in a single transformation step?

Your objective map0 tried · 0 right · 54 untouched

What you have tried across DP-700's objectives, not a readiness score.

Coverage checked against the published exam guide on Aug 11, 2026.

These are independent practice questions, written against this certification's published exam guide. They are not the certification vendor's own questions, and not the real exam.