Try:
| eval t=if(tag="x" OR tag="y", tag, NULL)|top t
Inside an if (or other eval function), an un-quoted string represents a field name, and a quoted string represents the string itself.
Or, for multivalue fields, try:
| eval t=mvfilter(match(tag, "x") OR match(tag, "y"))
| top t
... View more