graph with zero values

Lanason

Registered User.
Local time
Today, 09:22
Joined
Sep 12, 2003
Messages
258
I am trying to produces a monthly graph - however in the raw data there is not data for Feb

how to I get it to show JAN FEB MAR APR with 0 for Feb rather than just JAN MAR APR ????
 
A query can only produce results that are contained in its underlying data. That means you must force data for February to be in your underlying data source. This can be done one of two ways:

1. Create a table of all months you want to report on. LEFT JOIN your existing query to it and then show all values from your new month table.

2. Put a fake record into your existing data for February.
 
Hi plog - I sort of reached the same conclusion and have worked on this and it produced the result - horrendous functionality isn't it
 
It is possible to display charts with zero values providing the data can be presented as a Crosstab query grouped by month.

You then specify the column headings Jan, Feb etc so that all months are plotted even if they have no data.

The screenshot shows a monthly chart with no data for March 2017 as an example of this in use

attachment.php
 

Attachments

  • MonthChart.jpg
    MonthChart.jpg
    44.5 KB · Views: 118
Last edited:
The reason you get a problem when missing data like that is because Access is designed to be "sparsely populated." That is, rather than having placeholder records automatically, it takes the approach of having NO records when you had no inputs.

Creating a dummy record or creating a LEFT JOIN are two ways to force a recordset to contain references to something that isn't really there.
 

Users who are viewing this thread

Back
Top Bottom