The Situation:
I am attempting to create an FMP solution to run our Fantasy Football League. There are two main databases: FFLTeams and NFLPlayers. The NFLPlayers database has an "FFLTeam" field that designates which fantasy team he is on (if any), and a "CurrentStatus" field (containing a 1 or a 0) which designates whether he is active or inactive for the upcoming fantasy game. A fantasy team owner will be able to change the CurrentStatus of the players on their roster to designate a starting lineup for the upcoming game.
The Problem:
I need a way to determine if a team's starting lineup is legal (ie., are too many players active? are there two starting quarterbacks?). Using a relationship called "roster" which relates the "FFLTeam" (team name) field from each database, it was simple to determine the total number of active players per team with a calculation field: ActivePlayersCount = Sum(roster::CurrentStatus). Unfortunately, my brain is about to explode trying to figure out how to calculate the number of active players per team at each position? In other words, how do I make calculation fields for ActiveQBCount, ActiveRBCount, etc.?
Essentially, without using scripts or finds, how do you use relationships to show (or count) a subset of a subset (eg., NFLPlayers on Czech Mate's fantasy team who are quarterbacks that are active)?