Access 2010 Calculated query field

carp117

New Member
Joined
Jan 28, 2013
Messages
2
I am using a query that compares two fields from a large db. This I can do. What I would like to do is - have a calculated field that tells me the number of matches found so I then can perform other calculations such as averages or percentages Etc. In Excel I use the Count or CountA functions and it works fine. Can You help?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Once you have designated which records have fields that match or don't match identified, create a new query with that field in your grid twice. In the new query run an aggregate query to count the number of instances that match and don't match. Look here for how to do that.

MS Access: Count Function
 
Upvote 0
Home------Away------Score------Played
Bath ------ Sale--------0-0
Bath -------Sale--------0-0
Bath -------Sale--------0-0
Bath -------Sale--------0-0
----------------------------------------4
I run a query to display these matches between Bath - Sale (no problem). I wish a result of 4 to be placed in the Played column.
 
Upvote 0
Try this:

Code:
SELECT Table1.Home, Table1.Away, Count(Table1.Score) AS Played
FROM Table1
GROUP BY Table1.Home, Table1.Away;
 
Upvote 0

Forum statistics

Threads
1,214,544
Messages
6,120,126
Members
448,947
Latest member
test111

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top