graph with zero values (1 Viewer)

Lanason

Registered User.
Local time
Today, 08:34
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 ????
 

plog

Banishment Pending
Local time
Today, 02:34
Joined
May 11, 2011
Messages
11,643
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.
 

Lanason

Registered User.
Local time
Today, 08:34
Joined
Sep 12, 2003
Messages
258
Hi plog - I sort of reached the same conclusion and have worked on this and it produced the result - horrendous functionality isn't it
 

isladogs

MVP / VIP
Local time
Today, 08:34
Joined
Jan 14, 2017
Messages
18,211
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

 

Attachments

  • MonthChart.jpg
    MonthChart.jpg
    44.5 KB · Views: 80
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:34
Joined
Feb 28, 2001
Messages
27,156
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

Top Bottom