Recent chats
ASKGEEZ Q&A GUIDETechnology & devices

How do I combine survey exports when the same question has different column names?

Quick answer

Before combining exports, create a field map that links each original column to one agreed heading. Rename equivalent columns consistently, then append the data: Power Query matches columns by header, not position, so different headings remain separate. Keep a source filename with each row where your workflow allows it, and record unmatched columns instead of silently dropping them. Review the mapping and combined output before using the data.

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

I have survey exports from different forms, and one asks the same question under “Email” while another calls it “Contact email.” What’s the safe way to combine them?

Geez

Start with a mapping step, not the append step. Decide on one agreed heading—such as contact_email—and map each original header to it. In Power Query, you can rename a column by editing its header, using the context menu, or choosing Rename on the Transform tab. Column names must be unique within a table, so check for conflicts after renaming. [S1]

Then append the normalized tables. Power Query matches columns by header name rather than position. If headers differ, they stay as separate columns, and missing values appear as null. [S2] That means Email and Contact email will not align until you give them the same agreed heading.

Treat the field map as a record of your decision, not just a temporary cleanup note. It should show both the original header and the final heading.

Follow-up question

What should the field-mapping table contain? I also have columns I don’t recognize in one export.

Geez

Use one row per source column. A practical design is:

source_file | source_column | agreed_column | decision | notes

For example, using hypothetical filenames and headers:

[export_A.csv] | Email          | contact_email | map    | Same intended question; confirm before merging
[export_B.csv] | Contact email  | contact_email | map    | Same intended question; confirm before merging
[export_B.csv] | Extra question |               | review | Meaning not confirmed; do not map yet

This example is a planning aid, not evidence that those fields mean the same thing. Confirm equivalence from the survey wording or other context you have. For an unfamiliar column, record its original name, file, and a brief note; leave the agreed heading blank until you can decide whether it belongs in the combined dataset. The append documentation explains header matching, but it does not prescribe a policy for unmatched fields. [S2]

If the columns only look similar but their wording, response options, or purpose may differ, mark them for review rather than combining them by guesswork.

Follow-up question

How do I keep track of which export a row came from after combining the files?

Geez

Include a source-file field in the combined result, for example source_file, and retain the filename alongside each row. In Microsoft’s documented Power Query example for combining CSV files from a folder, the output includes a source filename column; the article also describes checking Source.Name to verify which files were included. [S3]

That example covers CSV files with a common structure and extension. It does not establish a complete traceability system for every survey-export format, nor does it guarantee that a filename alone is enough for your needs. If you need to retrace transformations, keep the field map and a record of which input files were included, too. Avoid overwriting your original exports; work from copies or keep the originals available under your own process.

Follow-up question

Can you give me a quick review routine before I use the merged file?

Geez

Yes. First, check that each intended equivalent field has the same agreed heading in every relevant input. Next, inspect the combined headers for accidental duplicates or separate versions of the same question. Check a few rows from each source file against the originals, including rows where an answer is blank. Finally, review the unmatched-column list and confirm that each item has an explicit decision: map it, keep it separate, or leave it out with a documented reason.

These checks can help you spot mapping mistakes; they do not prove that two questions are semantically equivalent or that the exports are complete. The documentation explains Power Query renaming, append behavior, and a CSV filename example, but does not define survey-specific equivalence rules or a full provenance policy. [S1] [S2] [S3]

A practical checklist

  • List every input file and each original column header.

  • Choose one agreed heading for each confirmed equivalent question.

  • Record uncertain or unmatched columns for review; do not guess a mapping.

  • Rename equivalent columns consistently and check for duplicate headings.

  • Append only after standardizing headings; retain a source filename field where possible.

  • Compare sample rows and headers with the original exports, then record unresolved decisions.

A few more useful answers

Should I match columns by their position in the export?

No. Power Query append matches columns by header name, not position. Standardize equivalent headings first so they align. [S2]

What should I do with a column that appears in only one export?

Record its source file and original header, then decide whether it is a distinct field, an equivalent field, or out of scope. The documentation does not prescribe how to handle unmatched survey fields.

Does keeping the filename provide complete traceability?

Not necessarily. A filename can provide file-level origin context in the documented CSV folder-combine workflow, but that example does not establish a complete traceability scheme for all exports. [S3]

Sources

References used for this guide.

  1. [S1] Rename columns in Power Query
    learn.microsoft.com · Checked
  2. [S2] Append queries in Power Query
    learn.microsoft.com · Checked
  3. [S3] Combine CSV files in Power Query
    learn.microsoft.com · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work