473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Compare this year vs. previous year data in one graph (date vs. quantity)

I want to create a graph (automatically in a report) which compares
the current year's values to the previous years by plotting two lines
on one chart.

I have one table which has the fields: Date and DeckDefects (which
is a number)

I would like the X axis to show months and the Y axis to show # of
DeckDefects
This should be real easy, but I can't find anything about it.

Thanks

Sep 25 '07 #1
1 4591
Craig, I assume that this year's values and last year's values are all in
the one table (which is the right design.) Since you want 2 different
results for two different periods from the same table, use a subquery to get
last year's results and match them to this one.

If subqueries are new, see:
Subquery basics: Year to date
at:
http://allenbrowne.com/subquery-01.html#YTD
The article discusses what subqueries are, and demonstrates how to make a
year-to-date query. You can do a period-compared-to-last-year in the same
way.

Once you have the query, you can use it as the source for one of the chart
types that handles multiple domains.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<cr*****@craigfr.comwrote in message
news:11**********************@r29g2000hsg.googlegr oups.com...
>I want to create a graph (automatically in a report) which compares
the current year's values to the previous years by plotting two lines
on one chart.

I have one table which has the fields: Date and DeckDefects (which
is a number)

I would like the X axis to show months and the Y axis to show # of
DeckDefects

This should be real easy, but I can't find anything about it.

Thanks
Sep 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
9
by: Rich | last post by:
Thanks for the Help in my previous post. I've been working on this and it's almost what I want. I want to obtain the user's current age by comparing their date of birth (user inputs) to the...
3
by: jannoergaard | last post by:
Hi I want to write a function that can return a sum for a given date range. The same function should be able to return the sum for the same period year before. Let me give an example: The...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
13
by: Shelley | last post by:
Compare Current Year Worksheet with Previous Year Worksheet and if SSN exists in Current Year Worksheet & Not in Previous Year - Copy this Row from Current Year Worksheet & Paste into Previous Year...
2
by: nsymiakakis | last post by:
Hello Everyone, I am almost completed with this database, the only thing left is to graph the results of a query. I built a parameter query that gives me totals for a date range that I enter. This...
6
craigfr
by: craigfr | last post by:
I am making a graph comparing last year's defect data with YTD defect data. Our fiscal year starts Nov.1 and ends Oct.31. To get the YTD, I started used a simple date serial criteria: Between...
25
by: rekhasc | last post by:
hi...... Its very urgent.............. how can i take only the year and month part and it should save in the database in the month and year field separately......... when i enter the date in the...
25
by: Brian | last post by:
I have a datetimepicker formated for just time, the user selects the time. I want to compare if that time is between midnight and 8 am dtmTime #11:59:59 PM# and dtmTime < #08:00:00 AM# this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.