Here is a non-command way.
group on the Primary Key (the sample identifier)
create a flag to check if the grouping has the value you want to show.
//Flag example
if result.name = 'color' and result.entry='yellow then 1
Sum this flag at the grou level
SUM(@flag,result.pkfield)
if your SUM>0 then youwant to show this group.
go into the select epert
show the formula
change the fomrula to 'group selection'
add your criteria here
SUM(@flag,result.pkfield)>0