You appear to have this relationship:
Physicians::Specialty = GroupedSpecialties::Specialty
Is that what you have? Isn't it possible for a physician to be certified in more than one specialty? What do you do then?
And for a given specialty group, you want a list of all certified physicians that are also a member of your organization?
ExecuteSQL is one option.
Define a calculation field, constMember, in GroupedSpecialties that returns the same value that you enter in Physicians to show that they are a member.
Make a new Occurrence of Physcians and link it to GroupedSpecialties like this:
GroupedSpecialties::constMember = Physicians|SamespecialtyMember::Member AND
GroupedSpecialties::Specialty = Physicians|SamespecialtyMember::Specialty
Then this calculation, defined in Physicans with a "context" specified for Physicians can give you a count of all member physicians with the same specialty group as that physician:
Count ( Physicians|SamespecialtyMember::Member ) // any field from Physicians that is never empty can be used here
More thoughts on this:
The same calculation defined in GroupedSpecialties would allow you to see a total in your portal for each specialty. A summary field and a summary report could then be used to produce a report listing each specialty group and the count of member physicians in that group. Such a report could include or omit a break down showing the totals within that group for each specialty.