Skip to content

How do I unpivot repeated review columns without accidentally turning a new identity column into observations?

Define which columns identify a record and which represent repeated observations before choosing an unpivot operation. Unpivot converts headings into attribute values and their cells into corresponding value rows. An operation that unpivots everything except selected identifiers can automatically absorb future columns. That is useful for new observation periods, but unsafe when a later identity or instruction column is mistaken for another observation.

PRODUCTION LEDGER TOOLSAISwapLab team · Editorial methodPublished 3 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file
Editorial workflow: Separate stable identifiers from repeated measurements → Select an evolution policy rather than a convenient preview → Add two different kinds of future column in a fixture.
Original editorial workflow diagram. It summarizes the guide's decisions; it is not a model output, interface screenshot or additional quality experiment.

How do I unpivot repeated review columns without accidentally turning a new identity column into observations?

The workbook is an external production log, not a live AISwapLab job feed. This documentation-based procedure is unexecuted. It concerns schema evolution during a wide-to-long transformation, not a generic editorial choice to turn prose into a table. A correct current preview does not prove the query will classify a future column correctly, because different unpivot choices establish different rules for unseen source fields.

What to do next

  1. 01

    Separate stable identifiers from repeated measurements

    Retain the source matrix and list columns that must remain attached to every output record, such as AssetVersion and Reviewer. Separately identify repeated observation columns and their shared meaning. Give each source row a stable, nonprivate fixture identifier before testing. Decide whether a new period column should enter automatically and whether unrelated future fields should require explicit review. Do not count the expanded output rows as newly generated assets; one source asset can legitimately produce several attribute-value observations.

  2. 02

    Select an evolution policy rather than a convenient preview

    Inspect the documented Unpivot Columns, Unpivot Other Columns and Unpivot Only Selected Columns choices in the installed Power Query interface. Microsoft distinguishes an explicit selected set from an operation that processes other columns around preserved identifiers. Choose the option whose future-column behavior matches the agreed source contract. Keep the attribute and value column names meaningful after transformation. Do not rely only on which columns are highlighted today; retain the actual applied step so its policy can be inspected later.

  3. 03

    Add two different kinds of future column in a fixture

    In a duplicate source, add one legitimate new observation column and one unrelated identity or instruction column. Refresh the proposed transformation and inspect their treatment separately. Confirm that original identity values accompany every observation and that unrelated fields do not silently become measurements. Compare a representative source row with its output attribute-value rows, retaining raw values where missingness needs explanation. Save a note describing which future changes are automatic and which require revising the query before use.

A concrete example

Unexecuted fixture: a sheet contains AssetVersion, Check_A and Check_B. The proposed long table retains AssetVersion and creates Check and Result. A later Check_C may belong to the same repeated series, while a new RightsOwner field does not. The fixture tests whether the selected unpivot policy treats those additions differently under an explicit schema rule. No query or production records were transformed for this example.

Production ledger native-contract worksheet

ContractProposed proofReject when
EvolutionTest new observation and identity columnsBoth are absorbed without review
Row grainTrace one source row to observationsExpanded rows are counted as new assets

Before you call it ready

  • Define identifiers and repeated observations separately.
  • Record the actual unpivot operation and future-column policy.
  • Test a legitimate observation addition and an unrelated field.

When to stop or choose another method

Stop if the source can add arbitrary columns without an agreed classification rule. Preserve the matrix and require a schema review before refreshing. More output rows do not imply more assets, reviews performed or website jobs.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example