473,466 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Setting up a query to graph two data series in access

2 New Member
Hi, I want to chart company goals in access. This was previously done in Excel. In Excel everything needs to be recreated on a yearly basis and I want to do something with a rolling year in Access. I have had a lot of "fun" trying to use the chart wizard...and OMG, I finally got something that displayed that was at least close to what I am looking for but it is still way off.

Here is what I am looking for: I want to graph by months the percent of target reached for a specific goal. So the X-axis would be months. The Y-Axis would be 0 to 100 % and the data by month would be two items; One being the [Goal] for the month and two, the [Actual Percent] of goal reached. I have the following Query that was produced by the Wizard:

Expand|Select|Wrap|Line Numbers
  1. PARAMETERS Forms!GoalsFrm.GoalID Long;
  2. TRANSFORM Count(GoalChartqry.ActualPercent) AS CountOfActualPercent
  3. SELECT (Format([GlDataDate],"mmm"" '""yy")) AS Expr1
  4. FROM GoalChartqry
  5. GROUP BY (Year([GlDataDate])*12+Month([GlDataDate])-1), (Format([GlDataDate],"mmm"" '""yy"))
  6. PIVOT GoalChartqry.Goal;
  7.  
Things that are not working are:
1) The Y-Axis is setup as 0 to 1.2 and needs to be 0 to 100%. I can format this as such but the data needs to show percent and not a count. I believe anyway.
2) The actual chart produced by the query has one line graph for the CountofAcceptedPercent. This is already in Percent in the GoalChartquery that pulls data from the table.
3) There is only one line graph and I want to show two. One for the [Goal] and one for the [Actual Percent]. I will format the graph later as line graph for the Goal and Column graph for the Accepted Percent.

I will also need to Show the chart by quarters after I get the months chart working. I am attaching an example of the Wizard Output from the above query and an example chart of what the end result should look similar to. The example has a third data series that is the sum of occurances. I would like to add this to the chart in the future.
Attached Files
File Type: doc Chart Example.doc (116.0 KB, 302 views)
File Type: doc Chart Wizard output.doc (314.0 KB, 294 views)
Apr 23 '13 #1
1 3802
evbro
2 New Member
Hello,

I have made what I think is some progress but I am still not obtaining the output I am looking for.

Here is what I did:
1) I changed the query TRANSFORM aggregate from COUNT to MAX. I believe this will work for now because the data is collected once per month. I tend to think AVG would be what I am looking for to aggregate the data but this currently produces an error.
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM Count(GoalChartqry.AcceptedPercent) AS CountOfAcceptedPercent
Is now:
Expand|Select|Wrap|Line Numbers
  1.  
  2. TRANSFORM MAX(GoalChartqry.AcceptedPercent) AS MAXOfAcceptedPercent
2) I also reformatted the chart to columns and formatted the vertical axis to show 50% to 100%

Now what I am looking for is adding another Line Graph to the chart to show the "Target %" goal. This will be another data series but how is this done in the SQL? Can it be done in this SQL code or do I have to make a UNION with another SQL query?

Also, the SQL was outputted by the wizard but is this correct? Do I need a TRANSFORM statement if I already have calculated % in the actual data?

Also, are the Pivot statment and groupings correct? I am a little green on how the SQL should be setup. Can anyone explain how the SQL should work and what I need for the second line graph?

I have attached the before and after output graphs. As a note, I am trying this charting with the built in Access charting and I am at the same time doing all things Identical to an unbound OLE Microsoft Graph. The Microsoft graph has a better looking output but also requires an added Microsoft Chart reference.

ANY HELP WITH HOW THE SQL WORKS WOULD BE APPRECIATED :)
- Teach me to fish and I will get my own food...
Attached Files
File Type: doc Chart Wizard output Rev 1.doc (556.0 KB, 274 views)
Apr 25 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ashwin Kutty | last post by:
Hi all, I sent this message to the jdbc list and received no response there and so am posting to this list hoping I could get some help here. Thanks in advance. ---------- Forwarded message...
2
by: SenseForAll | last post by:
First please note I am a novice at VBA and not even that experienced with DAO/ADO and MS-SQL. Any assistance is appreciated. That said... I have an application written in Access w/ VBA. I need to...
0
by: karen s via AccessMonster.com | last post by:
I searched the knowledge base for a way to do this but am having no luck with it. The directions state to select the data series that you want to plot along a secondary value axis, then on the...
15
by: Marcus | last post by:
I created a VB.Net 1.1 application that iterates through all the tables in any basic Access 2000 database passed to it and generates the same table structure in a SQL Server Express database. The...
20
by: TC | last post by:
I need an automated procedure to copy data from an Access table to a SQL Server table. Speed is important. What is the recommended technique? I can export the data from Access, copy it via FTP,...
0
by: gregoryenelson | last post by:
Does anybody know how to change data series from a histogram/bar representation to a line in a Graph on a Report? I have 5 measurements I need to follow. I created the report and the queries and...
2
by: billelev | last post by:
Hi there, My question does not concern the exporting of data to CSV so much as the format of the exported data. The data to be exported consists of a time series of prices for a number of assets....
7
ollyb303
by: ollyb303 | last post by:
Hi, I am having a bit of a problem with TransferText macro. I am using TransferText, Export Delimited (no field names) to export the results of a query as a .csv file. The query is based on...
5
by: amd321 | last post by:
i want ot make a site that represent graph data structure. and i know how to do it in c or c++ my qustion is 1.i can save my information in structure that i made myself in C ++, and represent it...
0
by: ian dean | last post by:
I need to add a polygon to a data series in mschart. I have tried the following:- ...using Systems.Windows.Forms; ... formGraphics.FillPolygon(myBrush,MyCurve); {this works OK but on a plain...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.