Business Data Analytics & Advanced Excel · Intermediate level

Intermediate level · Module 1: Power Query for Analysts · Lesson 3 of 3

Maintainable Queries

Organise queries so others can understand them and refresh problems are easy to fix.

In this lesson you will

  • Name and organise queries and steps
  • Diagnose and fix refresh errors

Key concepts

query names and groupsstaging queriesstep namesrefresh errors

The lesson

Give queries and steps meaningful names, group them, and disable loading for staging queries used only to build others.

Most refresh errors come from changed sources: a renamed column, a new sheet name, a moved file. Read the error, find the step and fix it.

Keep a short note of each query's purpose and source so successors can maintain it.

Step by step

  1. Rename queries and key steps.
  2. Group them by purpose.
  3. Break a source on purpose and fix the error.
  4. Write the query notes.

Practice activity

Tidy the solution's queries and document them.

Expected result: Organised queries that refresh after a simulated source change is fixed.

Check your understanding

  1. What is a staging query?

    Show answer

    A query used to build others, not loaded into the model.

  2. What causes most refresh errors?

    Show answer

    Changes in the source, such as renamed columns or moved files.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.