I might misunderstand the question but if I understand correctly you have a dataview of object X and either want to show the associated objects Y if there are any or do not show the association if none is there?
Because that you can achieve to set this expression on the conditional visibility of the reference selector:
if $currentObject/MyFirstModule.X_Y = empty then false else true
Or am I missing the point here?
Regards,
Ronald