Need help to make a RowSource for a Graph

M

Mota

Hi;
I have a table named [PrescriptionsTBL],having a numeral (Byte) field called
[PT] that mostly gets values between 1 to 10.
At the end of month the table may have up to 5000 records and i want to know
how many percent of records in the table have [PT]=1,and how many percent
with [PT]=2,and so on.My best option to show that is a circle or "Pie
Graph",but i couldnt make a proper RowSource for it.Can anyone please help
me?
Thank you in advance.
 
P

Paco

You can use this query to generate the numbers and then calculate the
percentages on the report (or form):

SELECT PrescriptionsTBL.PT, Count(PrescriptionsTBL.PT) AS CountOfPT
FROM PrescriptionsTBL
GROUP BY PrescriptionsTBL.PT;
 
M

Mota

No need to calculate percent.I needed a query to use as rowsource of a
circle graph and your comment works well.
Thank you for ur help.

Paco said:
You can use this query to generate the numbers and then calculate the
percentages on the report (or form):

SELECT PrescriptionsTBL.PT, Count(PrescriptionsTBL.PT) AS CountOfPT
FROM PrescriptionsTBL
GROUP BY PrescriptionsTBL.PT;



Mota said:
Hi;
I have a table named [PrescriptionsTBL],having a numeral (Byte) field called
[PT] that mostly gets values between 1 to 10.
At the end of month the table may have up to 5000 records and i want to know
how many percent of records in the table have [PT]=1,and how many percent
with [PT]=2,and so on.My best option to show that is a circle or "Pie
Graph",but i couldnt make a proper RowSource for it.Can anyone please help
me?
Thank you in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top