Others

How to Show All 12 Months in an Access Query Including Months with No Sales

Algirdas JasaitisAlgirdas Jasaitis Nov 2, 2026 869 views

Question details

The user needs to display a complete 12-month timeline in an Access report chart, but the aggregate query skips months that have no sales revenue.

How to Show All 12 Months in an Access Query Including Zero Sales Months
Product
Microsoft Access
Device & OS
not provided
Scenario
Creating a continuous monthly sales report or chart that requires a complete January-to-December axis.
Observed behavior
Months with zero sales are entirely omitted from the aggregate query results, breaking the timeline in the generated chart.
Before you start

Ensure you have created a standalone master table or a static query that contains a definitive list of all 12 months of the year, as this will serve as the continuous timeline source.

Solution 1Recommended

Use a Left Join with a Master Months Table and the Nz Function

Create a dedicated table containing all 12 months and perform a Left Join with your sales query to ensure every month appears, then format empty data with the Nz function.

By default, Access inner joins only return matching rows. A Left Join ensures all records from the left table (your 12-month list) are displayed, even if there are no corresponding sales records in the right table.

1
Create a Master Months Table

Create a new table named 'tblMonths' with a single Date/Time field named 'SalesMonth'. Populate this table with the 12 months of the year you are reporting on (e.g., Jan-2020, Feb-2020).

2
Configure the Left Join

Open your query in Design View. Add both 'tblMonths' and your sales data table. Click and drag to link the date fields. Double-click the joining line and select the option to 'Include ALL records from tblMonths and only those records from the sales table where the joined fields are equal'.

3
Apply the Nz Function to Revenue

In your query design grid, modify your revenue calculating field to wrap the data with the Nz function, such as `Nz(Sum([Revenue]), 0)`. This forces Access to display a 0 instead of leaving the field blank for months with no sales.

Use a Left Join with a Master Months Table and the Nz Function
Data Type Formatting: For accurate chronological sorting in your final report chart, ensure the month fields are formatted as Date/Time rather than Short Text. Short Text fields may cause your chart to sort months alphabetically.
Free Microsoft Office alternative

Process Complex Data Easily with WPS Office

While Microsoft Access requires complex queries, left joins, and specific functions to display empty data points, WPS Spreadsheet allows you to effortlessly chart complete timelines using PivotTables with 'Show items with no data' enabled. WPS Office is a free, lightweight suite fully compatible with Microsoft Office formats.

  1. 1. Download WPS Office: Visit the official WPS website to download the free installation package for your operating system.
  2. 2. Install the Suite: Run the installer and follow the on-screen instructions to set up the software.
  3. 3. Create Pivot Charts: Launch WPS Spreadsheet, import your raw data, and create seamless charts that easily display zero-value timeline points.
Completely free and lightweight office suiteFully compatible with Microsoft Excel (.xlsx) formatsEasily display empty months in PivotTable charts without SQLFamiliar user interface with zero learning curve for Office users
microsoft office alternative - wps office

Frequently Asked Questions

Why does my standard Access query skip months with zero sales?

Standard aggregate queries in Access use an Inner Join by default, which only includes records that exist in both tables. If a month has no sales, no record exists in the sales table, causing the query to exclude that month entirely.

What exactly does the Nz function do in an Access query?

The Nz (Null-to-Zero) function evaluates a variant or field and checks if it is null (empty). If the value is null, it replaces it with a zero (or another specified fallback value), which is required for mathematical calculations and proper chart rendering.

Can I use a Short Text field for months instead of Date/Time?

Yes, you can use Short Text (like 'Jan-2020'), but your charts and queries might sort the data alphabetically (e.g., April, August, December) instead of chronologically. Using a Date/Time data type is always recommended for timeline-based reporting.

Is there a way to show missing months without creating a separate table?

While it is technically possible using complex UNION queries or writing custom VBA code to generate the missing months dynamically, creating a static 'tblMonths' table is significantly more efficient, reliable, and easier to maintain.