Timedora

Importing and Combining Data with Power Query

A practical guide to importing files, combining compatible folder contents, and refreshing Power Query results reliably.

Connect to a File and Check the Import

Choose Get Data in Excel or Power BI, then select a connector suited to the file, such as Excel workbook, Text/CSV, or JSON. After connecting, inspect the preview or Navigator: it shows the available tables, sheets, or other data objects. For a workbook, select the table or worksheet you actually need rather than importing unrelated objects.

Decide whether to shape the data before it enters the workbook or report. Choose Transform Data to review and adjust it in Power Query Editor; choose Load when the preview is ready to use.

For a CSV, check the delimiter, file origin (encoding), and whether the first row contains headers. A wrong delimiter or header setting can make the preview misrepresent the data. Power Query may detect headers and data types automatically, but treat those detections as a starting point: confirm that date columns are dates, numeric columns are numbers, and text columns are text before loading.

Filter and Combine Compatible Files

Use a folder connector when you want to process a set of files together, such as monthly exports stored in one directory. Choose Get Data > From Folder, provide the location, and inspect the resulting file list in Power Query Editor. Its Content column holds each file’s binary content; metadata includes the name, extension, and folder path.

Filter this list before combining. For example, keep only the intended .csv files from a particular subfolder and exclude temporary files or unrelated exports. This helps prevent accidental inclusion of data that does not belong in the result and avoids errors caused by files that should not be processed.

Combining works best when the files are the same kind and have consistent columns representing the same fields. In the source example, January, February, and March CSV files each contain Date, Product, and Sales. After combining, their rows are appended into one table. Once the listing is filtered, select Content and choose Combine Files.

Power Query uses an example file—usually the first by default—to determine how to read the others. If that file is unusual, choose a representative one. For workbooks, verify the intended table or sheet; for text files, check the delimiter and header options. Power Query creates supporting sample and transformation queries, applies the extraction steps to each file, and appends the results. Editing the sample-file transformation changes how every file is interpreted.

Files with different columns, layouts, or formats may not combine as intended: one may use Order Date where another uses Date, for example, or a CSV may have a different delimiter. Standardize differences at the source when possible; otherwise, filter incompatible files out and handle them separately. After combining, inspect for missing columns, unexpected values, and incorrect types. Some versions offer to skip files that produce errors. Use that option only if excluding those files is acceptable, and check what was omitted.

Refresh Without Assuming the Data Is Fixed

Power Query saves transformations as query steps. Refreshing retrieves updated source data and repeats those saved steps. A folder query can include new files when they are placed in the connected location and match the expected structure and import settings.

For that repeatable process to work as intended, keep the source path stable and file layouts consistent. Review the refreshed results when files change. Refresh does not automatically resolve a changed schema or repair malformed source files, so a new or altered input may still need to be corrected or handled separately.