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:
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
- 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.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Choose a dedicated source. Keep monthly exports in a folder or other supported file source intended for this workflow.
- 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.
- 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.
- 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.
- 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.
- 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.
Rank #3
- 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.
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.
Rank #4
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.
Quick Recap
Best Value
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.




