473,405 Members | 2,373 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,405 software developers and data experts.

Help with chart

I have a table with amongst others 2 fields: DateIn and DateOut. The idea is
to make a chart that shows the average number of days it takes for a request
to be answered. I'm planning to make a linechart with on the x-axis the
months (starting with the current month and ending 11 months later) and on
the y-axis the average number of days (DateOut minus DateIn). So the chart
will show the average number of days per month.

How would I go about this?
Which outputfields do I need in my table/query for my chart?
It's possible that there are 100 records for January and just 20 for
February. Is there a way to make that visible in the same chart?

Thanks in advance for any help.
john
Jun 8 '07 #1
7 2209
"John" <jo@hn.comwrote in
news:f4***********@textnews.wanadoo.nl:
I have a table with amongst others 2 fields: DateIn and
DateOut. The idea is to make a chart that shows the average
number of days it takes for a request to be answered. I'm
planning to make a linechart with on the x-axis the months
(starting with the current month and ending 11 months later)
and on the y-axis the average number of days (DateOut minus
DateIn). So the chart will show the average number of days per
month.

How would I go about this?
Which outputfields do I need in my table/query for my chart?
It's possible that there are 100 records for January and just
20 for February. Is there a way to make that visible in the
same chart?

Thanks in advance for any help.
john
Some general responses to your info.
1) Do you mean starting with the current month and ending 11
months earlier? It's hard to predict the future.
2) if there are 100 records in January the average will be a
single number, same as for 20 rows in February.

Now some practtical information.
Create a query with year(DateIn)*100+month(datein)as a column.
and datediff("d",datein,nz(dateout,date()) as a second column.
the third column would contain any field which would have non-
blanks. Turn this into a Summary query, group by the first
field, average the second, and count the third.
You can also add a criteria to the first column with the
expression (year(date()-1)*100 +month(date()

This will give you 12 rows, with the period, the average
duration and the number of rows making that average.

Plot the period on the X axis, and either or both other columns
on the Y azis.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 9 '07 #2

Thanks Bob,
See inline:
Some general responses to your info.
1) Do you mean starting with the current month and ending 11
months earlier? It's hard to predict the future.
:-) You're right, that was what I meant.
2) if there are 100 records in January the average will be a
single number, same as for 20 rows in February.
True, but the number of records involved per month would help to interpret
the figures. For instance, it could indicate that a month with a great less
number of requests, has a lower duration average. If the number of requests
for 2 particular months are the same but there is a big difference between
the average duration times of those months, that would be something to look
into.

Any idea on how to incorporate that into the chart?
Now some practtical information.
Create a query with year(DateIn)*100+month(datein)as a column.
and datediff("d",datein,nz(dateout,date()) as a second column.
the third column would contain any field which would have non-
blanks. Turn this into a Summary query, group by the first
field, average the second, and count the third.
You can also add a criteria to the first column with the
expression (year(date()-1)*100 +month(date()

This will give you 12 rows, with the period, the average
Great! thanks,
john
"Bob Quintal" <rq******@sPAmpatico.caschreef in bericht
news:Xn**********************@66.150.105.47...
"John" <jo@hn.comwrote in
news:f4***********@textnews.wanadoo.nl:
>I have a table with amongst others 2 fields: DateIn and
DateOut. The idea is to make a chart that shows the average
number of days it takes for a request to be answered. I'm
planning to make a linechart with on the x-axis the months
(starting with the current month and ending 11 months later)
and on the y-axis the average number of days (DateOut minus
DateIn). So the chart will show the average number of days per
month.

How would I go about this?
Which outputfields do I need in my table/query for my chart?
It's possible that there are 100 records for January and just
20 for February. Is there a way to make that visible in the
same chart?

Thanks in advance for any help.
john
Some general responses to your info.
1) Do you mean starting with the current month and ending 11
months earlier? It's hard to predict the future.
2) if there are 100 records in January the average will be a
single number, same as for 20 rows in February.

Now some practtical information.
Create a query with year(DateIn)*100+month(datein)as a column.
and datediff("d",datein,nz(dateout,date()) as a second column.
the third column would contain any field which would have non-
blanks. Turn this into a Summary query, group by the first
field, average the second, and count the third.
You can also add a criteria to the first column with the
expression (year(date()-1)*100 +month(date()

This will give you 12 rows, with the period, the average
duration and the number of rows making that average.

Plot the period on the X axis, and either or both other columns
on the Y azis.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 9 '07 #3
I managed to add the number of requests to the month by basing another query
on the first query, so I can use that in the y-axis. I used this expression:

test: Str([expr1])+" ("+Str([AantalVanID_verzoek])+")"

It works but I get an extra space after the first bracket. It looks like
this:
200701 ( 9)
200702 ( 8)

Where does this space come from?
john

"John" <jo@hn.comschreef in bericht
news:f4**********@textnews.wanadoo.nl...
>
Thanks Bob,
See inline:
>Some general responses to your info.
1) Do you mean starting with the current month and ending 11
months earlier? It's hard to predict the future.

:-) You're right, that was what I meant.
>2) if there are 100 records in January the average will be a
single number, same as for 20 rows in February.

True, but the number of records involved per month would help to interpret
the figures. For instance, it could indicate that a month with a great
less number of requests, has a lower duration average. If the number of
requests for 2 particular months are the same but there is a big
difference between the average duration times of those months, that would
be something to look into.

Any idea on how to incorporate that into the chart?
>Now some practtical information.
Create a query with year(DateIn)*100+month(datein)as a column.
and datediff("d",datein,nz(dateout,date()) as a second column.
the third column would contain any field which would have non-
blanks. Turn this into a Summary query, group by the first
field, average the second, and count the third.
You can also add a criteria to the first column with the
expression (year(date()-1)*100 +month(date()

This will give you 12 rows, with the period, the average

Great! thanks,
john
"Bob Quintal" <rq******@sPAmpatico.caschreef in bericht
news:Xn**********************@66.150.105.47...
>"John" <jo@hn.comwrote in
news:f4***********@textnews.wanadoo.nl:
>>I have a table with amongst others 2 fields: DateIn and
DateOut. The idea is to make a chart that shows the average
number of days it takes for a request to be answered. I'm
planning to make a linechart with on the x-axis the months
(starting with the current month and ending 11 months later)
and on the y-axis the average number of days (DateOut minus
DateIn). So the chart will show the average number of days per
month.

How would I go about this?
Which outputfields do I need in my table/query for my chart?
It's possible that there are 100 records for January and just
20 for February. Is there a way to make that visible in the
same chart?

Thanks in advance for any help.
john
Some general responses to your info.
1) Do you mean starting with the current month and ending 11
months earlier? It's hard to predict the future.
2) if there are 100 records in January the average will be a
single number, same as for 20 rows in February.

Now some practtical information.
Create a query with year(DateIn)*100+month(datein)as a column.
and datediff("d",datein,nz(dateout,date()) as a second column.
the third column would contain any field which would have non-
blanks. Turn this into a Summary query, group by the first
field, average the second, and count the third.
You can also add a criteria to the first column with the
expression (year(date()-1)*100 +month(date()

This will give you 12 rows, with the period, the average
duration and the number of rows making that average.

Plot the period on the X axis, and either or both other columns
on the Y azis.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com


Jun 9 '07 #4
"John" <jo@hn.comwrote in
news:f4**********@textnews.wanadoo.nl:
I managed to add the number of requests to the month by basing
another query on the first query, so I can use that in the
y-axis. I used this expression:

test: Str([expr1])+" ("+Str([AantalVanID_verzoek])+")"

It works but I get an extra space after the first bracket. It
looks like this:
200701 ( 9)
200702 ( 8)

Where does this space come from?
john

"John" <jo@hn.comschreef in bericht
news:f4**********@textnews.wanadoo.nl...
>>
the str() function always puts a leading space
To eliminate it use either the format() function

format([AantalVanID_verzoek],"0") see the help on format()

or the concatenation operator.

Str([expr1]) & " (" & [AantalVanID_verzoek] & ")"
--
Posted via a free Usenet account from http://www.teranews.com

Jun 9 '07 #5
Thank you.
john

"Bob Quintal" <rq******@sPAmpatico.caschreef in bericht
news:Xn**********************@66.150.105.47...
"John" <jo@hn.comwrote in
news:f4**********@textnews.wanadoo.nl:
>I managed to add the number of requests to the month by basing
another query on the first query, so I can use that in the
y-axis. I used this expression:

test: Str([expr1])+" ("+Str([AantalVanID_verzoek])+")"

It works but I get an extra space after the first bracket. It
looks like this:
200701 ( 9)
200702 ( 8)

Where does this space come from?
john

"John" <jo@hn.comschreef in bericht
news:f4**********@textnews.wanadoo.nl...
>>>
the str() function always puts a leading space
To eliminate it use either the format() function

format([AantalVanID_verzoek],"0") see the help on format()

or the concatenation operator.

Str([expr1]) & " (" & [AantalVanID_verzoek] & ")"
--
Posted via a free Usenet account from http://www.teranews.com

Jun 9 '07 #6
John wrote:
number of requests, has a lower duration average. If the number of requests
for 2 particular months are the same but there is a big difference between
the average duration times of those months, that would be something to look
into.

Any idea on how to incorporate that into the chart?
Hi John,

I would prefer to present this in two charts. One for average duration
and then another for number of requests.

I deal a lot with charts and too much information in one chart is just
overwhelming. My idea of the purpose of a chart is that it jumps out
and screams "LOOK AT <whatever concept I'm trying to portray>!!!!".
It's harder to do this with too much information.

Besides, if you look at MS Chart, there are TWO major things it can
portray: a single VALUE (either duration average or number of requests)
broken down by some GROUPING (month). You can also further classify the
grouping (in your case, possibly by year/fiscal year) - -this is known
as a series.

If you stick to the above concept, you'll avoid a lot of brain ache. 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Jun 11 '07 #7
Thanks for the insight Tim.
I will do so.
john

"Tim Marshall" <TI****@PurplePandaChasers.Moertheriumschreef in bericht
news:f4**********@coranto.ucs.mun.ca...
John wrote:
>number of requests, has a lower duration average. If the number of
requests for 2 particular months are the same but there is a big
difference between the average duration times of those months, that would
be something to look into.

Any idea on how to incorporate that into the chart?

Hi John,

I would prefer to present this in two charts. One for average duration
and then another for number of requests.

I deal a lot with charts and too much information in one chart is just
overwhelming. My idea of the purpose of a chart is that it jumps out and
screams "LOOK AT <whatever concept I'm trying to portray>!!!!". It's
harder to do this with too much information.

Besides, if you look at MS Chart, there are TWO major things it can
portray: a single VALUE (either duration average or number of requests)
broken down by some GROUPING (month). You can also further classify the
grouping (in your case, possibly by year/fiscal year) - -this is known as
a series.

If you stick to the above concept, you'll avoid a lot of brain ache. 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me

Jun 11 '07 #8

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

Similar topics

1
by: Paul | last post by:
Let say, I have a table called USERS with the following fields: UserID, Date, Name, ComType. ComType gets it's info from another table called TYPE with fields: TypeID, TypeOfCom, with options:...
22
by: PeteCresswell | last post by:
I've been to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp, but still don't have a clue. For example, I've got a chart object namde...
1
by: Damini | last post by:
Hi everybody, I was wondering if somebody out there could tell me what is wrong with this code? I'm trying to plot more than one chart ina a single sheet of excel using VB. Here is the code i used...
0
by: ashraf83 | last post by:
hi guys, i need help plotting chart in Vb, im using SQL to plot the chart but when i use it the first data wont be included in my chart , let say if it was supposed to be data range from 3/1/2006 to...
0
by: JohnnyB | last post by:
I've been wrestling with this off and on for a few days and came close but it's still not right. I'll try to explain it as best I can. I created a report with a pie chart on the first page that...
2
by: orfiyus | last post by:
Hi I am working on a script that that creates charts. So I decided to follow this tutorial using the chart director api. I more or less understand everything going on I just cant seem to find...
5
by: fruityfreak | last post by:
What languages is this in??? <?php session_start(); require('db.php'); mysql_connect(MACHINE, USER, ''); mysql_select_db(DBNAME); //Obtaining session variables (From do_login.php)
23
by: muddasirmunir | last post by:
i had developed an accouting software and in this i made some chart for this i used MSChart . As long as charting is concerned it is working fine all the chart is showing the desired results. the...
0
by: asifu9 | last post by:
Hello all, I am new to MS Access VBA 2007, i need help on how to open a chart form in switchboard. SwitchBoard having options to open a form in Add mode and edit mode, in both of...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.