var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Chart based on 2 fields
I need to create a pic chart based on two fields and I haven't been able to figure it out.
I have a field that shows the job number, Hours Completed, and hours remaining.
Here is my sql
When a user selects a job # I want to display a chart that shows a pie chart with one slice showing the timecompleted and the other showing the timeremaining.
SELECT [Job #] ,TimeCompleted,TimeRemaining FROM dbo_vw_ReleasedJobStatusTimeRemaining
I guess normally with a pie chart all the data comes from one field. In this case I have data in two fields so I'm not sure how to get the result I need.
Can someone please help me?
I'm using access 2010
You need to create three Queries to prepare the Data suitable for the PIE Chart. The SQLs are given below, copy and paste them into SQL Editing Window of new Query.
Query Name: Query1
Query Name: Query2
SELECT [Job #], TimeCompleted FROM dbo_vw_ReleasedJobStatusTimeRemaining;
Query Name: UnionQuery
SELECT [Job #], TimeRemaining FROM dbo_vw_ReleasedJobStatusTimeRemaining;
The result set in UnionQuery is a two column value and suitable for PIE Chart.
SELECT Query1.[Job #], Query1.TimeCompleted FROM Query1
SELECT Query2.[Job #], Query2.TimeRemaining FROM Query2;
Check the following links for examples of creating Charts:
LEARN MS-ACCESS TIPS AND TRICKS - MS-Access and Graph Charts
LEARN MS-ACCESS TIPS AND TRICKS - MS-Access and Graph Charts2
(Learn MS-Access Tips & Tricks)
Learn Advanced MS-Access Programming with sample VBA Code.
All responses are based on Access 2003/2007