473,386 Members | 1,803 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,386 software developers and data experts.

Reporting " count " question

Heres one that is giving me fits ( = = Access newbie), more than likely
something simple that I blew right over . . . any help is appreciated -

I have a report based on a query, with several columns I need to work with.
Values in the cols are " Over " and " Under", as text values. The query is
for a start / end date, my count of records returned will be variable
depending on the runtime dates entered.

I need to count the number of " Over " , count the total lines , then return
a percentage " Over " in each col of the report ( there are 5 cols , Field
names [test_a], [test_b] ...[test_e] ) . Am I doing the right thing
attempting to " count " or do I need to take another approach ?

(count(test_a where val="Over") / count(*) x 100) // no attempt at
correct syntax here

for % Over is my goal. All my attempts are giving me " #Error " in the text
box I've placed in the footer.

Again, any help is greatly appreciated.
Nov 13 '05 #1
3 1957
Rabun,
Mebbe you need to use a subquery to provide your counts of over/under to the
query in which they live?

"Rabun" <hy***********@yahoo.com> wrote in message
news:e1**************************@ALLTEL.NET...
Heres one that is giving me fits ( = = Access newbie), more than likely
something simple that I blew right over . . . any help is appreciated -

I have a report based on a query, with several columns I need to work
with.
Values in the cols are " Over " and " Under", as text values. The query is
for a start / end date, my count of records returned will be variable
depending on the runtime dates entered.

Nov 13 '05 #2
Weeellll . . . I did get the % result by assigning 0 /1 to under / over via
a secondary field corresponding to the test_x fields with onchange subs,
then doing count / sum . . . then hiding all the calculating textboxes on
the report. Jeez, wayyyy to cluttered . . . proof that I don't belong here
:) Was looking for a cleaner way to do it . . . I'll check into the
subqueries, Access is all new to me.

Thanks for the reply !

Rab

"Alan Webb" <kn*****@hotmail.com> wrote in message
news:Ee********************@comcast.com...
Rabun,
Mebbe you need to use a subquery to provide your counts of over/under to the query in which they live?

(clip)
Nov 13 '05 #3
I tend to do this sort of stuff like this.

Use an alias in a query column: Total:IIf(IsNull([test_a]),0,1) Make this a
sum column.

Next: CountOvers:IIf([test_a]="over",1,0) Make this a sum column also.

Next: Over%: [CountOvers]/[Total] Make this an expression column and
format to percent.

Works for me. By the way, watch those control names in the reort as that can
cause errors if they are the same as the field names... I always rename them
txtBlahBlah or lblBlahBlah etc.

Hope that's of some help.

Jeff.

"Rabun" <hy***********@yahoo.com> wrote in message
news:e1**************************@ALLTEL.NET...
Heres one that is giving me fits ( = = Access newbie), more than likely
something simple that I blew right over . . . any help is appreciated -

I have a report based on a query, with several columns I need to work with. Values in the cols are " Over " and " Under", as text values. The query is
for a start / end date, my count of records returned will be variable
depending on the runtime dates entered.

I need to count the number of " Over " , count the total lines , then return a percentage " Over " in each col of the report ( there are 5 cols , Field
names [test_a], [test_b] ...[test_e] ) . Am I doing the right thing
attempting to " count " or do I need to take another approach ?

(count(test_a where val="Over") / count(*) x 100) // no attempt at
correct syntax here

for % Over is my goal. All my attempts are giving me " #Error " in the text box I've placed in the footer.

Again, any help is greatly appreciated.

Nov 13 '05 #4

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

Similar topics

8
by: Remy Blank | last post by:
Hello unittest users, In a project I am working on, I have a series of tests that have to be run as root, and others as a normal user. One solution is to separate the tests into two different...
13
by: MLH | last post by:
I have a textbox control used to enter a single alphanumeric character. It changes the case of "i" to upper case. But it does not do so with the letter "g". Its left as "g" - not changed to "G"? ...
25
by: Nitin Bhardwaj | last post by:
Well, i'm a relatively new into C( strictly speaking : well i'm a student and have been doing & studying C programming for the last 4 years).....and also a regular reader of "comp.lang.c" I...
0
by: YellowFin Announcements | last post by:
Whitepaper: "Yellowfin Reporting" enables Embedded Business Intelligence -------------------------------------------------------------------------------- Embedded reports are a standard...
3
by: Chen ShuSheng | last post by:
HI, I am now study a segment of codes: ------------------------ printf("%p\t",fp); /*add by me*/ fseek(fp, 0L, SEEK_END); /* go to end of file */ printf("%p\t",fp); ...
2
by: Daniel Lipovetsky | last post by:
I would like for an object to "report" to a container object when a new instance is created or deleted. I could have a container object that is called when a new instance is created, as below. ...
1
by: spinoza1111 | last post by:
I want the GUI of the spinoza system to not piss me off with the usual type of progress reporting one sees: the flashy, colorful, and utterly uninformative gizmos that go back and forth and round...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.