Append Monthly Tables in Power Query Without Creating Duplicate Columns
Use Append Queries to stack rows from monthly tables. Power Query matches appended columns by name, so Amount and Net Amount can become separate columns even when they sit in the same position. Standardize the headers in each source query before appending.
Compare the column names before combining anything
Open each source query and write down the date, identifier and amount field names. Confirm they mean the same thing before renaming them. A gross amount and a net amount should stay separate even if a report happens to use either name interchangeably. Also check that dates and amount fields have compatible types.
Append adds records. Merge looks up or joins columns through a key. If your goal is to add rows for February below January, append is the natural operation. If you need a vendor name beside an ID on each row, the relevant operation is typically a merge.
Append as new and validate by month
- Rename genuinely equivalent fields to a shared name, such as
Amount, in the source queries. - In the Power Query Editor, choose Append Queries as New, then select the two sources. Keeping a separate output makes it easier to inspect the input and the combined result side by side.
- Check the new query’s headers. Look for old names or an unexpected second column.
- Filter the output by month and compare the counts and one known amount from each input before loading the result into the workbook.
Suppose two fictional source tables have 40 January transactions and 35 February transactions. If no later filter or grouping is applied, the result should have 75 rows. A missing amount in every February row can be a header mismatch even when the total row count is correct. This example is synthetic rather than a measured import.
Investigate nulls that remain
Power Query inserts null in a column when the source for that row does not offer that column. If field names now match, examine the original records: a blank amount in the source may be legitimate. Do not replace every null with zero unless zero is the agreed meaning. Add a source or month column if it is difficult to trace a row back to the file that created it.
댓글
댓글 쓰기
안녕하세요 :)