Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

Add a Month with Power Query and Automate Monthly GL Consolidation

Date.AddMonths shifts dates; it does not consolidate a ledger. Use Power Query folder combination or append for monthly exports, then validate the output against your accounting controls.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Date.AddMonths shifts a date or date/time value by a specified number of months; it does not combine general-ledger exports or verify that a consolidation is accounting-correct. For recurring monthly files, use Power Query’s Folder connector and Combine Files workflow when the files share a structure, or append prepared monthly queries when the tables already exist. Then validate the result against your organization’s ledger controls.

What Date.AddMonths does—and what it does not do

The Power Query M function Date.AddMonths(dateTime, numberOfMonths) adds a month offset to a date, datetime, or datetimezone value and returns a value of the corresponding type. Microsoft documents its syntax as Date.AddMonths(dateTime as any, numberOfMonths as number) as any. See Microsoft’s Date.AddMonths reference.

As an Amazon Associate I earn from qualifying purchases.

For example, Microsoft’s examples show that adding five months to May 14, 2011 returns October 14, 2011, and adding 18 months to a datetime preserves its time component:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Date.AddMonths(#date(2011, 5, 14), 5)
// #date(2011, 10, 14)

Date.AddMonths(#datetime(2011, 5, 14, 8, 15, 22), 18)
// #datetime(2012, 11, 14, 8, 15, 22)

The function changes a value; it does not read multiple files, append ledger rows, define a fiscal calendar, or determine whether a journal is ready to post. If you need a period-start or period-end date, define that rule separately and test month-end and leap-year cases in your query. Do not assume a simple month offset implements your organization’s accounting-period rules.

#1 Best Overall
Sale
The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • The Microsoft Office 365 Bible: The Most Updated and Complete Guide to Excel, Word, PowerPoint, Outlook, OneNote, OneDrive, Teams, Access, and Publisher from Beginners to Advanced
  • ABIS BOOK

Choose how to combine monthly ledger exports

The right approach depends on how your monthly data arrives and whether it has already been prepared as Power Query tables.

Approach Use it when How it combines data Key consideration
Folder connector and Combine Files Monthly exports are stored as files with a shared format and structure. Power Query uses an example file to create transformation steps that it applies to each file. Filter the file listing to the intended inputs before combining; see Microsoft’s Folder connector guidance and Combine files overview.
Append queries Each month is already represented by a prepared Power Query query. Append adds rows and matches columns by header name, not by position. Review differing headers: fields not present in a table can result in nulls. See Microsoft’s Append queries guidance.
Table.Combine Your M code assembles the input tables as a list. The function accepts a list of tables and returns their appended result. Confirm the input tables and resulting schema; see Microsoft’s Table.Combine reference.

There is no universally best option established by these mechanics alone. Folder combination fits a recurring drop-folder process; Append is straightforward when monthly queries already exist; Table.Combine is useful when you are assembling the tables in M code.

Set up a repeatable folder-based consolidation

When a new export arrives each month, a dedicated folder workflow can apply the same extraction and cleanup pattern to each eligible file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Choose a dedicated source. Keep monthly exports in a folder or other supported file source intended for this workflow.
  2. Connect and filter the file list. Use Power Query’s Folder connector, then filter by extension, folder path, filename pattern, and required reporting period as applicable. Exclude unrelated, temporary, or archived files before combining. Microsoft notes that folder combination expects files with compatible format and structure.
  3. Combine and transform. Choose the Combine and Transform workflow and select a representative example file. Power Query creates an example-file query and helper-query/function pattern; the generated transformations are applied to the files. Put repeatable per-file cleanup in the generated Transform Sample File query.
  4. Retain lineage. Keep identifying fields such as source filename and accounting period so an output row can be traced to its input file and period.
  5. Check the schema. Confirm the expected column names and data types before loading. Investigate unexpected or missing fields rather than relying on a combined result without review.
  6. Validate before use. Reconcile the combined output with the controls required by your accounting process before loading it for reporting or other downstream use.

Append prepared monthly queries safely

Append is appropriate when each month is already available as a query. Power Query aligns values by column names rather than column positions. A column called Account in one query will align with Account in another even if the columns appear in different orders; a differently named field is not the same column and may leave nulls in the combined result.

  • Standardize column names and data types across the monthly queries where they represent the same fields.
  • Review the resulting columns for unexpected nulls or fields that appear only in some periods.
  • Preserve period and source identifiers if users need to filter or trace the consolidated rows.

For M code that holds the prepared tables in a list, Table.Combine is the corresponding table-combination function. The input still needs review for the schema your reporting or accounting process expects.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate the consolidated ledger against your controls

Microsoft’s cited Power Query documentation explains file combination and table appending; it does not prescribe GL reconciliation or period-close controls. Those requirements must come from your organization’s authoritative accounting policy. As practical checks, reconcile record counts, account and period coverage, source totals, and—where applicable—debit-credit balance. Also apply the organization’s rules for signs, currencies, approvals, and completeness before treating the query output as a dependable ledger consolidation.

These checks address a different problem from Date.AddMonths: the function can calculate a date value, while consolidation and accounting correctness depend on the source files, transformation logic, schema, and controls around the result.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.