Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Count subgroups on simple-sort, flat-file

Featured Replies

I have* a flat file, tracking sales, with fields like Date, State, Salesperson, Item, etc. I frequently find myself doing a search on some single criterion (e.g. all sales by a particular salesperson), and sorting on a second criterion, e.g. State (by viewing in Table view and just clicking on the column header).

What I want to do is add a summary function that tells me how many "groups" are produced as a result of the Sort.

So, for example, if I sort by State, I want to know: how many unique States are in this sorted found set? If I sort by Date, I want to know: how many unique Dates are in this sorted found set? etc.

I found an old discussion (about a year old) on the forum that solves this problem partially: it involves defining a summary Count function, then a calculation that inverts the count, then another summary function that totals the inverses of the counts. Whew! It works just fine, but it's particular to counting unique occurrences in a specific field. I want a solution more generic than this.

It seems odd to me that FMP can generate reports with subgroups and subsumarries, and can tell me how many records are in each subgroup, but can't (easily) tell me how many subgroups there are. Doesn't this seem like a natural thing to count?

* Actually, I don't have this at all. What I have is way more complicated than this, and doesn't involve sales of any sort. But this is an abstract version of what I want to do.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.