Courseiva
Prepare the datahardMultiple SelectObjective-mapped

Combine Files in Power Query

You are importing data from a folder containing multiple Excel files with the same structure. You use Power Query's 'Combine Files' feature. Which TWO statements about this process are correct?

Quick Answer

The answer is that the Combine Files feature generates a sample file query to define transformations. This is correct because Power Query uses the first file in the folder as a template to infer the schema and apply consistent column types, data cleaning steps, and other transformations across all subsequent files. The sample file query acts as a blueprint, ensuring each file is processed identically, which is critical when importing data from multiple Excel files with the same structure. On the PL-300 exam, this concept tests your understanding of Power Query’s folder import logic and the automatic creation of helper queries like the sample file and parameter queries. A common trap is assuming each file is transformed independently or that the feature merges files without a template. Remember the memory tip: “First file sets the style” — the sample file query is the template that standardizes every file’s transformation.

⚠ Common exam trap

Test-takers frequently assume the 'Combine Files' feature automatically handles deduplication or relationship creation, when in fact it only standardizes transformations across files based on the first file's structure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

It uses the first file as a template for transformation.

When you use Power Query's 'Combine Files' feature, it uses the first file as a template to infer the schema and transformations. This sample file query defines how each subsequent file is processed, ensuring consistent column types and transformations across all files.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • It automatically removes duplicate rows across files.

    Why it's wrong here

    No automatic deduplication.

  • You can change the transformation order after combining.

    Why it's wrong here

    Order is fixed once the combine function is created.

  • It uses the first file as a template for transformation.

    Why this is correct

    The first file's transformations are applied to others.

  • It automatically creates relationships between files.

    Why it's wrong here

    Combine Files appends data, does not create relationships.

  • It generates a sample file query to define transformations.

    Why this is correct

    Power Query creates a sample file query.

About these practice questions

Courseiva writes every PL-300 question from scratch — 217 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

5 more ways this is tested on PL-300

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You are loading data from a folder containing multiple Excel files with identical structure. Some files have inconsistent column names due to manual edits. You need to ensure that all data is loaded correctly without errors. What should you do in Power Query?

medium
  • A.Use the 'Combine Files' feature with a sample file, then in the transformation step, promote headers and rename columns using a mapping table.
  • B.Use 'Merge Queries' to join the files based on row position.
  • C.Change the data source to a SharePoint folder and use 'Load to Data Model' directly.
  • D.In Power Query, use 'Enter Data' to manually create the schema.

Why A: The 'Combine Files' feature in Power Query uses a sample file to infer the schema, and then you can apply transformations like promoting headers and renaming columns using a mapping table to handle inconsistent column names across files. This ensures all data loads without errors by standardizing the column names before combining.

Variation 2. You are importing data from a folder containing multiple CSV files with the same structure. You want to combine all files into a single table, but only include files that have been modified in the last 7 days. What Power Query transformation should you use?

easy
  • A.Use 'Sample File' and manually filter
  • B.Filter the folder contents by 'Date Modified' before combining
  • C.Use 'Merge Queries' with the folder
  • D.Combine files using 'Combine & Load', then filter by date modified

Why B: Filtering the folder contents by 'Date Modified' before combining ensures only recent files are loaded, optimizing performance. Option A is incorrect because 'Sample File' is used to preview the structure of a representative file, not to filter which files are combined. Option C is incorrect because 'Merge Queries' is for joining tables based on a key, not for appending multiple files with the same structure. Option D is incorrect because combining all files first and then filtering loads all data into memory, which is less efficient than filtering before combining.

Variation 3. You are importing data from a folder containing multiple CSV files with identical structure. You use the 'Combine files' transform in Power Query. Which TWO statements are true about this process?

easy
  • A.The sample file is automatically selected as the first file in alphabetical order.
  • B.Only the sample file is imported; other files are ignored.
  • C.The combine process uses Power Automate to merge files.
  • D.Power Query creates a function that applies the same transformations to each file.
  • E.Power Query creates a sample file query that serves as a template for all files.

Why D: When you use the 'Combine files' transform in Power Query, it automatically generates a function that applies the same transformations (e.g., promoting headers, changing data types) to each CSV file in the folder. This function is invoked for every file, ensuring consistent data shaping across all files.

Variation 4. You are importing data from a folder containing multiple CSV files with identical structure. You want to automatically combine all files into one table in Power Query. Which connector should you use?

easy
  • A.Excel Workbook connector
  • B.CSV connector
  • C.Web connector
  • D.Folder connector

Why D: The Folder connector is the correct choice because it is specifically designed to connect to a folder containing multiple files, and when combined with the 'Combine Files' transformation in Power Query, it automatically merges all CSV files with identical structures into a single table. This connector handles the iterative process of reading each file and appending rows without manual scripting.

Variation 5. You need to prepare data from a folder containing multiple CSV files with identical structure. What is the most efficient way to load all files into a single table?

easy
  • A.Import each CSV file separately and then append them
  • B.Use the 'From Folder' data source and then click 'Combine & Transform Data'
  • C.Write a Python script in Power Query to read and combine files
  • D.Use a dataflow to connect to the folder and apply the 'Combine Files' transformation

Why B: The 'From Folder' data source in Power Query automatically detects multiple CSV files with identical structure and provides a 'Combine & Transform Data' button that merges them into a single table in one step. This is the most efficient method as it eliminates the need for manual imports or scripting, leveraging Power Query's built-in file combination logic.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.