Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Graph RowSource Query

Status
Not open for further replies.

AccessHelp123

Programmer
Apr 27, 2005
91
US
Hi,

What I am trying to do is feed a query to the graph so it selects fields from two tables and shows me two series on the graph, one from each table. The query I have now plots the graph for one field in one table. The query looks something like this.

SELECT table1.Date, Avg(table1.LostCalls)FROM table1 GROUP BY table1.Date

Please let me know if you have any ideas on how to do the same for two tables. Appreciate your help.
 
Could you provide details about your other table? I'm not sure how you would expect anyone to answer your question without some additional information.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
SELECT table1.Date, Avg(table1.LostCalls)FROM table1 GROUP BY table1.Date

this query gives me a line graph with LostCalls information for all the dates listed in table1(example 03/05/2005-03/29/2005). table2 has dates that start from 03/30/2005 - 04/25/2005) with a field 'LostCalls'. I am trying to get another series of LostCalls information in the same graph for dates 03/30/2005-04/25/2005. So, basically the graph has dates from 03/05/2005 to 04/25/2005 and I will have two series in the graph.One series from Dates 03/05/2005 to 03/29/2005) for LostCalls from table1 and the next series from 03/30/2005-04/25/2005 for LostCalls from table2. Please let me know if this makes sense. Thanks.

 


SELECT table1.Date, Avg(table1.PctDigLostCalls) AS AvgOfPctDigLostCalls1, table2.Date, Avg(table2.dcr_8c) AS AvgOfdcr_8c
FROM table1, table2
WHERE (((table1.SiteName)="074-012"))
GROUP BY table1.Date, table2.Date;


I wrote something like this but this does not work. It only shows the dates related to table1 and all the fields are repeated, so instead of twelve records I have 120. Please help me with this. Thanks.


 
I don't know any reason why you would have lost calls in two different tables. However, to combine these into one query, use a union query.

SELECT [Date],Avg(LostCalls) as AvgLostCalls
FROM table1
GROUP BY [Date]
UNION
SELECT [Date], Avg(LostCalls)
FROM table2
GROUP BY [Date];

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top