Reports :: Count Unique Records Only

Sep 30, 2013

In a report, I have a textbox to show the number of employees in the report.

I use this formula : =Count([last name])

Sometimes the same person has multiple entries, so the count is wrong.

How can I show only the number of different employees and ignore the duplicate names?

View Replies


ADVERTISEMENT

Reports :: Returning A Unique Count In A Report?

Oct 27, 2014

I have a report. behind that report is a query.

The query returns the parts used for each job. This could be 1 to many, so I get 1 to many rows returned in the query for each job. There can be a number of jobs to a work schedule (I'll call this WS). Each job is for a particular model. So I bascially have

WS1 JOB1 MODELx PART1
WS1 JOB1 MODELx PART2
WS1 JOB1 MODELx PART3
WS1 JOB1 MODELx PART4
WS1 JOB2 MODELw PART7
WS1 JOB2 MODELw PARt8
WS1 JOB3 MODELx PART5
WS1 JOB3 MODELx PART6

I want to count the number of jobs each model appears in ie MODELx appears in 2 jobs, MODELw appears in 1 job.

I've read DCOUNT can eliminate duplicates but I can't see how to use it to do so.

I have (general gist)

DCOUNT("model number"."query","model number" = [model num])

View 3 Replies View Related

Count Unique Records

Sep 15, 2006

Hello, I am new to Access and trying to run a query that will count only unique invoice numbers in my table. I am sure this is an easy command, and thank you for your help!

View 3 Replies View Related

Count Unique Records

Sep 10, 2003

Hi there:

I have a Question

In Access 2002 (XP) I have to write a query that displays unique Id's:

For Example:

CustomerID Company Name
1 ABC INC
1 ABC INC
2 XYZ INC
2 XYZ INC
3 PQR INC

The query should be 3 records.

But for some reason when I write the query in sql view it doesnot work.

Thanks,
Ashi
http://www.ringvirginia.com

View 12 Replies View Related

Count Function To Return Unique Records

Sep 20, 2005

Not sure if I worded my subject correctly. Here's my problem.. I've used query to combine 2 tables of data..

Here are my fields..

I've assignment_num field, project_num field, project_name field, emplyee_name field.

here are my data..

assignment_num field: 1001, 1002, 1003, 1004, 1005
project_num field: 20,20,15,16,15
employee_name field: tom peter, tom peter, tom peter, julie, sally

What I want is to display the employee name with 2 projects or more...

What i have done?
I've done a group by and then count project_num field.. I also added a condition whereby the countofproject_num > 1.. everything went well except that the countofproject_num display 3 instead 2..

pls help.

View 13 Replies View Related

Modules & VBA :: Count Number Of Unique Records Based On Range Of Date

Jan 19, 2015

Code:
' count records in query
Dim rs As DAO.Recordset
Dim db As Database
Dim strSQL As String
Dim beginDatum As String
Dim eindDatum As String
Set db = CurrentDb

[code]....

View 4 Replies View Related

Reports :: How To Count The Records

May 13, 2013

I have a report where I would like to count the records. I can do this in a typical way to count the records but I'm a little stuck on this scenerio.

In my report I pick a date range of 04/01/2013 to 04/30/2013 it displays all my records. I have 3 records for 04/01/2013 what I would like is for that to count 1, not 3. So on and so forth - so it will show me at the end of the report how many times a week they worked. Is there a way to do that?

View 1 Replies View Related

Reports :: Count Number Of Records Under Value Of 6

Jan 23, 2014

I am trying to get the number of records under the value of 6 ... E.g. On the report it looks like this

Code:
Date Result

1 5.6
2
3 8.2
4 6.6
5 4
6
7 10

And the code I am using is

=Count([Result]<6)

The resulting answer is 5 , when the correct answer should be 2

View 1 Replies View Related

Reports :: Not Count Duplicate Records In Report

Mar 30, 2015

I have a simple report which looks as given below:

ID Number Products
122 Cups
133 Pencils
122 Cups
133 Pencils

When I use the count function I get the total count of the record as 4.what I want is count the product varieties which should be 2

View 5 Replies View Related

Reports :: Setting Groupings On Report - Count Of Defined Records

Mar 29, 2013

Report has records of errors. There are 3 types of error. In the report footer, I would like a total count (this is working!) and a count by type (can't get this to work).

Error Total =Count[ErrorType]
Compliance Total =Sum(IIf([ErrorType]="Compliance",1,0))
Audit Total =Sum(IIf([ErrorType]="Audit",1,0))
Quality Total =Sum(IIf([ErrorType]="Quality",1,0))

I have tried setting groupings on the report but this alters the detail sorting (currently sent by the date field newest to oldest) and provides the count within the detail.

View 14 Replies View Related

Count Unique (yep, Again)

Sep 20, 2007

Hello,

I noticed my subject has been discussed numerous times in this forum. I must have read nearly all topics, but I simply can't get it to work.

I have a table listing: country | category | article | turnover

I wish to make a query which gives me:

country | sum of turnover | count of (unique) categories used by this country | count of (unique) articles sold by this country.

This way I can evaluate with how many different categories a certain country achieves a certain turnover...

It look so simple but I can't figure it out. I hope I'm clear in my question.

HEEELP!

Cheers,
Stefan

View 2 Replies View Related

Queries :: How To Count Unique Dates

Aug 4, 2015

I want to do a unique count of dates when an activity was done in my table. The table may have multiple entries of the activity performed possibly on the same date by an individual

e.g. table entries

Code:

approvalNoSys dateAssessed Activity
100 01/08/2015 Audit
100 01/08/2015 Audit
100 01/05/2015 Audit
100 01/05/2015 Audit
100 01/02/2015 Audit
100 01/01/2015 Audit

Unique audit Count must equal 4

Code:

totV = ECount("[dateAssessed]", "R_P_Data_P", "[approvalNoSys] = '" & [Forms]![cmrOverview]![txtappNoSys] & "' AND [Activity] Like '*audit*'")
totV = Unique count
dateAssessed = date field in R_P_Data_P table
R_P_Data_P = table
"[approvalNoSys] = '" & [Forms]![cmrOverview]![txtappNoSys] & "' = criteria for the customer in question to separate them from many other customers in the table.
Activity = text field in R_P_Data_P table
audit = the activity

I'm also trying to avoid having to build total queries etc to them reference them, I'd like getting the desired outcome in an expression or small code.

I read about Ecount but my complier doesn't recognise the function

View 6 Replies View Related

Queries :: Count Unique Dates

Jan 10, 2014

I have 2 linked tables, tblPN & tblReceivedDate. tblPN has field PN and tblReceivedDate has field [Received Date]. The tables are used to record the receipt of different part numbers and the date they received. I want to use a query to count how many times a part number is received. The catch is that I only want to count a part once even if it is received more than once on the same date. With the data in the attached DB the count for PN 123 would be 5.how to configure the query to do what I need to do?

View 9 Replies View Related

Reports :: Display Breakdown Of Unique Reports In The Footer

Jun 16, 2014

I am trying to produce statistics reports in my database. The user selects the information they require in a form (date from, date to etc). A query then produces the results listing each job in turn which is what I want however at the end I would like to produce sub-totals for each client.

Depending on the criteria selected by the user, only some clients will appear in the list. Ideally I would like the footer to show something like:

Client 1 - 4 jobs
Client 2 - 1 job
Client 5 - 6 jobs
Client 6 - 17 jobs

I have tried using the field:

Code:
=Count([ClientDetailsName])

However this only gives the total number of jobs.

View 6 Replies View Related

Queries :: Count Unique Values Without GROUP BY

Sep 15, 2013

I am currently using the below code to query values that have a unique "OverrideDescription" and where by the "Upload Date" is always the latest.

SELECT t1.*
FROM [DaisyServiceRates-Amended] AS t1 LEFT JOIN [DaisyServiceRates-Amended] AS t2 ON (t1.OverrideDescription = t2.OverrideDescription) AND (t1.[Upload Date] < t2.[Upload Date])
WHERE t2.OverrideDescription IS NULL;

However I also need to be able to do a unique count of the [OverrideDescription] field.

I have found methods whereby I can do use, but they all use a GROUP BY function, the issue being that when I use this method it prevents be from updating the values saying "recordset not updateable".

Any method that does not use the GROUP function. I did also try preforming the COUNT on a separate table and doing as JOIN, but this also prevented updates to the date.

View 1 Replies View Related

Queries :: Access 2007 / Query Count Of Unique IDs

Jan 16, 2014

I have a basic query off a currency table :

Quote:

SELECT tblCurrencies.CcyID, tblCurrencies.Ccy
FROM tblCurrencies
ORDER BY tblCurrencies.Ccy;

Now - I have a separate table of balances, which is linked to the currency table by the same CcyID, and which also has identifiers to link it to other tables (e.g. AccountID)

As part of the above query, I want to return the count of unique AccountID's in the balance table for each currency. So in other words, I want to know, for each currency, how many unique accounts exist?

Each AccountID could appear one or more times in the balance table (one-to-many relationship), so I only want to count the number of unique ID's.

So I started with the following :

Quote:

SELECT tblCurrencies.CcyID, tblCurrencies.Ccy, Count(tblBalances.AccountID) AS NoOfAccounts
FROM tblCurrencies INNER JOIN tblBalances ON tblCurrencies.CcyID = tblBalances.CcyID
GROUP BY tblCurrencies.CcyID, tblCurrencies.Ccy
ORDER BY tblCurrencies.Ccy;

But this just gives the number of AccountID's per currency (regardless of duplication within them)

I found this article which informs me that a Count(Distinct) query won't work in Access and to use subqueries instead.

View 14 Replies View Related

Modules & VBA :: Total Count Of Unique Values In A Query

Jan 13, 2015

I have the following code:

Code:
Dim rs As DAO.Recordset
Dim db As Database
Dim strSQL As String
Set db = CurrentDb
strSQL = "SELECT DISTINCT tbl_contract_lev.ContractID FROM (tbl_leverancier_gegevens INNER JOIN

[Code] ....

The result of the query is a list fo unique values but by including the "count" function in SQL seems not te be working in combination with "DISTINCT"...

View 5 Replies View Related

Count Records Problem. Display Field Even When Count Is Zero.

Apr 13, 2006

I have a table tblBookings.

In this table it has a bookingID, CustomerID and some other none relevant details.

The CustomerID comes from table tblCustomer. i.e a customerID must exist in the customer table to be allowed in the bookings table tblBookings

A customer can exist in tblCustomer without existing in the booking table.

I am trying to write a query that will list each and every customer ID in the tblCustomer and count the number of bookings that that customer has (even if it is zero).

I have a query that will count the bookings if they exist in the booking table and display the number of times that a customer appears in the bookings table.

SELECT tblBookings.CustomerID, Count(tblBookings.CustomerID) AS NoOfBookings
FROM tblBookings
GROUP BY tblBookings.CustomerID;


How do I create a query that will do this but list all customers even if they don't exist in the bookings table (but obviously occur in the customers table)

I am trying to create a similar query where all bookings per hotel are listed even if no bookings are made for that hotel. I am guessing the answer is the same as above.

The Ritz. Bookings 0
The Hilton. Bookings 3
The Carlton. Bookings 0
The Lowry. Bookings 2

For every hotel.

That kind of thing.

If you need more information please shout.

View 3 Replies View Related

Reports :: Separate Pages By Unique Field?

Jul 29, 2013

I have a DB with all my patients and (among other things) all their referral source.

I would like to print a status report of all my patients, grouped by the referral source, and fax them to the appropriate offices. Easily done with the report wizard.

What I need to know is, how do I create one report, but force a new page for each referral source?

View 4 Replies View Related

Reports :: Give Control A Unique Criteria

Apr 15, 2015

I have a report that is filtered like Year_ = "2014/15".

Say for example on this report it contains two text boxes:

Text box 1 has a control source of "March_T"
Text box 2 has a control source of "Aprril_T"

How can I make text box 1 be filtered by Year_ = "2014/15" and text box 2 be filtered by Year_ = "2015/16"?

View 2 Replies View Related

Reports :: How To Make Unique Invoice Number

Dec 24, 2014

I am selling some products, namely A to M. I record the orders of costumers in a table, named "orders". For example, if costumer "Jack" has ordered as the following:

Code:
ID costumer product quantity unitprice orderdate

12 jack A 4 10 25/11/2014
13 jack B 5 5 25/11/2014
14 jack C 1 4 25/11/2014
15 jack F 3 2 25/11/2014
16 Jack G 4 8 25/11/2014
17 Jack H 1 7 25/11/2014

Then I make a report based on the above table and issue that as the invoice to the costumer, who is jack here.

How can I make a unique invoice number, which automatically increases sequentially for each invoice? Do I need to add a new column to the table? I also need to be able to look for a specific invoice based on the number, or date.

View 11 Replies View Related

Reports :: Counting Unique Field In A Report

Jul 19, 2014

I have a report which is based on a query. The query combines information from TBLDwgReg and TBLDwgRegDtls. The unique field linking these two tables is DrawingNo. The query - QRYDtldDwgReg - is showing 99% of the information I want to see.

My problem is this - one drawing can be revised several times. I have my report grouped by IssuedBy and then grouped by DrawingNo. In the group footer for IssuedBy I want to count the number of drawings issued by a particular consultant. For example...the structural engineer has issued 17 drawings for a particular project but when I do a count it is returning a total 27 because some of those drawings have been revised.

I tried grouping in the query and counting the DrawingNo field there but that's not working either.

View 14 Replies View Related

Reports :: Table With Data - Unique Part Of A Record

May 28, 2013

I have a table with data like this

Field_1,Field_2,Field_3
A,B,5
A,B,3
A,C,7
A,C,6
X,Y,4
X,Y,3

I need a report where I can only see

A,B,5
A,C,7
X,Y,4

That is Group by Field_1 and only show the records which has Field_2 with the max. value of Field_3

View 1 Replies View Related

Unique Records?

Sep 2, 2004

I have sort of a complex unique fields question. And I know there are probably quite a few ways to get at the answer, but I'm a novice so the simplest way would be best. I have a table (with over 25M rows, otherwise I'd be doing this in excel) with many columns. One of the columns is employee ID, and another is a date. Each employee ID however can have multiple rows with different dates. As an end product I need to have one row for each employee ID with the most recent date. An idea I had would be to sort by employee ID and then by the date. Then insert a column of if statements that asks if a record has the same employee ID as the record below it, but I don't have any experience with if statements in access (and VERY little SQL experience). But there is probably an easier way. Any help would be appreciated. Thanks!

View 1 Replies View Related

Unique Records

Sep 8, 2006

I have a database that contains sales order information. A sales order could have multiple records (if that sales order has several different items ordered) or just one record. There is a status column in each record that shows a "C" (for closed). For items that were not delivered in a particular sales order, the status column is left blank.

Here is an example:

Sales Order Item Ordered Status
908111 Coaxial Cable C
908111 Transreceiver C
908111 Connector
908112 Coaxial Cable C
908112 Transreceiver C
908112 Connector C

The above example shows that only 2 items from sales order # 908111 were delivered or "C" but one of them is not. For sales order # 908112, all items were delivered or "C". I want to take all records of sales order # 908111 and show it on a table of partially delivered and all records of sales order # 908112 in delivered table.

I've tried different filtering options and group by but it doesn't seem to be working. Anyone has any ideas?

View 1 Replies View Related

Subforms & Unique Records - Please Help!

Apr 12, 2006

Firstly, my thanks to everyone who is going to be able to help with my problem, and also my apologies if this thread isn't in the right forum.

Ok, I am trying to construct a database at the moment for a small business. The database holds a number of customer records, and all of the basic design and construction I am skilled enough to write myself.

However, I'm running into major problems whilst trying to tackle a certain task...


The Required Situation

I have a form called Contacts. This form shows all of the customer details, laid out neatly, and draws its information from a table of the same name. This aspect works fine.
Now what I've been asked to look into is the possibility of adding two buttons to this form. Each button, when clicked, will open a pop-up window where extra details, such as a log of received telephone calls, can be entered and searched if necessary. the two buttons should do the same thing where the code is concerned, but store their details separately (one button is for sales calls logged, the other for support calls).
Now it is essential that these records are tied - uniquely - to whichever record the database user was on when they clicked the button.


My Current Thinking

I'm stumped. Well, half stumped. I think that the solution lies in sub-forms, but I'm not nearly skilled enough to actually impliment them (and don't want to waste my time doing so if there's an easier way).
Currently I have two tables, contacts and calls, the former to store the customer information, the latter to store the calls that are entered on this new form.
The form contacts has a button on it which opens the form calls. Now I can go to any record I like, click the button and open the calls form. I can enter details for such, and the record gets saved to my calls table. The problem is that it is not unique. No matter which record I'm on when I open the calls form, the details are always the same.

Yes, I know the absoute easiest way is to simply have a few fields on the main contacts form to log these details, and that it will uniquely tie to that record, but unfortunately that is not a practical solution. These calls may run into the hundreds, and must be easily navigated by the database users.



If I've not been clear enough, I can attach a copy of my database for you guys to take a look at, but what I'm after in the first instance is (a) whether there is an easier way to solve my problem, and, (b) if not, whether I'm right about needing subforms.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved