I would suggest that that you are pushing the boundaries of Power Apps filters with that level of nesting and that is probably the reason for the outcome you receiving.
Without your data and then building a model, it would be very difficult for me to get the ouput exactly correct, however I will give you a structure that may solve this for you
With(
{
_Members,
AddColumns(
DB_Invitations,
participantEmail,
participant.Email,
RegisterRecord,
LookUp(
DB_Registers,
CreatedBy.Email = participant.Email
)
)
},
ClearCollect(
colTeams,
AddColumns(
DB_Teams As Team,
Members,
Filter(
_Members,
team_id = Team.ID
),
DisciplineRecord,
LookUp(
colDisciplines,
name = Team.discipline
),
Owner,
Team.CreatedBy.DisplayName,
AcceptedMembers,
CountIf(
Filter(
_Members,
team_id = Team.ID
),
RegisterRecord.team_id = Team.ID
),
MaxPlayers,
LookUp(
colDisciplines,
name = Team.discipline
).players +
LookUp(
colDisciplines,
name = Team.discipline
).substitutes,
IsFull,
CountIf(
Filter(
_Members,
team_id = Team.ID
),
RegisterRecord.team_id = Team.ID
) >=
LookUp(
colDisciplines,
name = Team.discipline
).players +
LookUp(
colDisciplines,
name = Team.discipline
).substitutes
)
)
);
Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
MVP (Business Applications) Visit my blog Practical Power Apps LinkedIn