Report Grouping: Multiple values under one common grouping

TonyD1016

Board Regular
Joined
Nov 18, 2021
Messages
59
Office Version
  1. 365
Platform
  1. Windows
I'm currently setting up an access report with multiple grouping levels.
One of these levels is by "County" and there are eleven unique values that I am dealing with: Berks, Bucks, Carbon, Chester, Delaware, Lehigh, Monroe, Montgomery, Northampton, Philadelphia, and Pike.

I would like records for three of these counties--Carbon, Monroe, and Pike-- to be grouped together under the under the heading of "Carbon/Monroe/Pike" and the remaining values under their own names.

I know that programmatic grouping is possible in Access, but I cannot wrap my head around the best way to accomplish this.

Anyone have any advice?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I've come up with a workable solution by changing the underlying report query.
I changed the original [County] Field entry to the expression:
SQL:
County: IIf([County]="Carbon","Carbon/Monroe/Pike",IIf([County]="Monroe","Carbon/Monroe/Pike",IIf([County]="Pike","Carbon/Monroe/Pike",[County])))


This created the county grouping I needed in the underlying query and I simply added it as a sort level in the group report.

But if there are any better solutions the community has I'd love to hear them.
 
Upvote 0
Another approach might be to have a grouping level that the ones you're trying to group belong to. So those 3 counties belong to group e.g. "South".
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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