count items in a grouped in a row?

supdawg

Well-known Member
Joined
Mar 18, 2007
Messages
608
Hey guys, I'm relatively new to Access. I have a query that I am grouping a bunch of tables together based on order number and what I need to know is how many purchase orders comprises my order number?

I am grouping by purchase order, but I want to know how many purchase orders per order number.

Can I count the number of unique PO's tied to that order number if its grouped by PO?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If you are "grouping" them, it sounds like you are already creating Aggregate Queries. Note that when you "Group By" certain fields, you can perform other functions on the other fields, like COUNT, SUM, MAX, MIN, etc.So just include the field you want to count, and change the Totals Row value for that field from "Group By" to "Count".

If you have duplicates, and want to count the unique values of that field, you may need to do this in a series of two aggregate queries:
1. Include the PO field in your initial Aggregate Query where you are just Grouping everything.
2. Create a second aggregate query based on the first, where now you are using the COUNT function on your grouped PO field.
 
Upvote 0

Forum statistics

Threads
1,221,845
Messages
6,162,350
Members
451,760
Latest member
samue Thon Ajaladin

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