I have table called " aug_base " with the following fields
Bill_period,day_1,day_2,day_3,day_4,day_5,day_6 upto day_60
I want to take report bill_period wise count of day_1,day_2,day_3 upto day_60
But in this count should be greater than 100 in each column.
For example :
bill_period day_1 day_2 day_3 day_4
CH1 748 748 748 88
CH1 800 80 80 80
CH1 280 280 85 85
Report should be
bill_period day_1 day_2 day_3 day_4
CH1 3 2 1 1
|
|
0
|
|
|
|
Reply
|
Utf
|
12/29/2007 8:48:00 AM |
|
I'll ignore the fact that your table isn't properly designed: that you
should never have repeating groups like that.
Try:
SELECT bill_period, Sum(IIf([day_1] > 100, 1, 0) AS CountOfDay_1,
Sum(IIf([day_2] > 100, 1, 0) AS CountOfDay_2, ...
FROM MyTable
GROUP BY bill_period
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Senthil" <Senthil@discussions.microsoft.com> wrote in message
news:AD0350B2-9A9C-4EDD-BC81-2D0DD9485CEA@microsoft.com...
>I have table called " aug_base " with the following fields
> Bill_period,day_1,day_2,day_3,day_4,day_5,day_6 upto day_60
>
> I want to take report bill_period wise count of day_1,day_2,day_3 upto
> day_60
>
> But in this count should be greater than 100 in each column.
>
> For example :
>
> bill_period day_1 day_2 day_3 day_4
> CH1 748 748 748 88
> CH1 800 80 80 80
> CH1 280 280 85 85
>
> Report should be
> bill_period day_1 day_2 day_3 day_4
> CH1 3 2 1 1
>
|
|
0
|
|
|
|
Reply
|
Douglas
|
12/29/2007 12:28:59 PM
|
|
I won't ignore the table design.
You have a spreadsheet, not a relational database table.
Consider exporting what's in the "table" to Excel and doing the
(spreadsheet) calculation in a spreadsheet.
NOTE: If you want to get the best use of Access' relationally-oriented
features/functions, you can't feed it 'sheet data.
Good luck!
--
Regards
Jeff Boyce
www.InformationFutures.net
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
"Senthil" <Senthil@discussions.microsoft.com> wrote in message
news:AD0350B2-9A9C-4EDD-BC81-2D0DD9485CEA@microsoft.com...
> I have table called " aug_base " with the following fields
> Bill_period,day_1,day_2,day_3,day_4,day_5,day_6 upto day_60
>
> I want to take report bill_period wise count of day_1,day_2,day_3 upto
day_60
>
> But in this count should be greater than 100 in each column.
>
> For example :
>
> bill_period day_1 day_2 day_3 day_4
> CH1 748 748 748 88
> CH1 800 80 80 80
> CH1 280 280 85 85
>
> Report should be
> bill_period day_1 day_2 day_3 day_4
> CH1 3 2 1 1
>
|
|
0
|
|
|
|
Reply
|
Jeff
|
12/29/2007 1:57:14 PM
|
|
|
2 Replies
227 Views
(page loaded in 0.073 seconds)
Similiar Articles: Count with a condition - microsoft.public.access.queries ...I have table called " aug_base " with the following fields Bill_period,day_1,day_2,day_3,day_4,day_5,day_6 upto day_60 I want to take report bill_period wise count of ... Unique entries based on condition - count distinct - microsoft ...Hi, I'm really struggling with what I thought should be easy. A B C D branch salesperson ... "Count" expression in report - microsoft.public.access ...Hi I have a field, named [Type]. In a report, what is the expression to count this field “[Type]” where Type=Truck ??? =Count([Type]) where type = ... count cells in a table that meet multiple criteria - microsoft ...Suppose your table is on Sheet1, occupies 100 rows, and you want to count the number of cells that have conditions met in columns A, B and C.You could use something ... Excel 2003 - deleting Duplicates under conditions - microsoft ...Unique entries based on condition - count distinct - microsoft ... Excel 2003 - deleting Duplicates under conditions - microsoft ... Unique entries based on condition ... Count cells with specific text between two dates? - microsoft ...Count cells matching two criteria (DATE & TEXT) - microsoft ... Count based on cell value between ... Excel - Count Number Of Cells Based On Two Conditions (2 Different ... ... Counting cells with conditional formatting - microsoft.public ...Easiest to Count on the Condition that turned the cells a certain fill color. In 2003 you must use VBA code to count colors. =46or those colored by CF it involves ... Query and Count no records Want a Zero - microsoft.public.access ...You probably use a where clause. The WHERE clause is evaluated first, before the GROUP/COUNT, and if no record passes the condition, no record would return. How to count cells that are highlighted by conditional formatting ...What conditions are used to set the CF in those cells? You need to construct a formula which incorporates those conditions - this might be a simple SUMIF if the ... Where Condition (OpenReport) - microsoft.public.access.reports ...I am struglling with the Where condition when I use OpenReport. In a form I have a list ... the list to see if it is selected. getSelectedList = "(" If ctl.ItemsSelected.Count ... COUNT command with condition : Count « Select Clause « SQL / MySQLCOUNT command with condition : Count « Select Clause « SQL / MySQL MS SQL Server :: Count If Condition - BigResource: Webmaster ...Count If Condition hi guys I need to do a count on a column in my table but i have to check for a condition first. Here is my sample data Providerdate COUNT with condition and group : Count « Select Clause « SQL / MySQLCOUNT with condition and group : Count « Select Clause « SQL / MySQL SQL Server: Count based on ConditionMany a times, you may want to do a count in SQL Server, based on a condition. The easiest way is to use a combination of SUM and CASE as shown in this example Excel: Count by Condition, free microsoft excel, reply thanksExpert: Richard Rost - 10/27/2009. Question QUESTION: Hi Richard , How are You? I am facing a challenge while i am tring to Count Coloumn A Text Value by placing a ... 7/24/2012 10:49:12 AM
|