Practical technology learning

Power Query Fill Down: Preserve the Sequence That Gives a Label Meaning

Power Query Fill Down: Preserve the Sequence That Gives a Label Meaning — conceptual learning illustration
AI-generated conceptual illustration.

A carried-forward label gets its meaning from the source convention and the sequence of records. This Power Query exercise uses fictional groups to make that dependence visible. The operation is useful only when the intended grouping justifies propagating a previous value.

Start with an ordered fixture

Create a stable sequence column containing 0, 1, 2, 3 and 4. In a separate label column, use null, Group A, null, Group B and null. State the source convention: a non-null heading applies to following records until the next heading. Do not infer that convention for an unfamiliar real source.

Predict the carry-forward assignments

Apply Fill Down only to the label column. For this fixture, the expected labels are null, Group A, Group A, Group B and Group B. The first row has no earlier known value to propagate. Save the expected assignments with sequence IDs so a later sort cannot hide a mismatch.

Preserve the meaningful order

Keep the stable sequence and establish its intended order before filling. Reordering rows by an unrelated column before propagation changes which label is above each null. A filled column can therefore look complete while expressing the wrong grouping. Compare output to the original sequence rather than counting only the remaining nulls.

Inspect visually empty cells

Power Query distinguishes null from an empty text value. If a source contains empty strings, inspect and intentionally convert the relevant values when that is part of the cleanup policy. Do not assume that two blank-looking cells will participate in Fill Down in the same way.

Review the transformation contract

  • The source rule linking a heading to later records.
  • A stable sequence that preserves the intended assignment.
  • Which column is filled and how null or empty text is handled.
  • The expected treatment of records before the first known label.

Recheck the assumption at refresh

Retain original labels and sequence IDs while reviewing a refreshed result. Fill Down does not verify the truth of a propagated category or invent a missing first heading. This small fixture provides an inspectable data-preparation step before the output is used in a Power BI report.

Primary references

Browse more practical learning articles