Hello,
I think the easiest way how to achieve this is through the
NodeLevel property of a current document, because the selected item transformation is applied on documents on different level than your datalist webpart is located. So the visibility macro could look like the following one:
{%CurrentDocument.NodeLevel == 1;%}
Best regards,
Jan Hermann