Your DAX query must evaluate to a table when you are using DAX as a query language.
E.g. this query is valid because it returns a table with one column and one row:
DEFINE MEASURE DimDate[MyMeasure] = COUNTROWS(DimDate)
EVALUATE
ROW("MyColumn", DimDate[MyMeasure])
But this query will fail because it returns a scalar value instead of a table:
DEFINE MEASURE DimDate[MyMeasure] = COUNTROWS(DimDate)
EVALUATE DimDate[MyMeasure]
You can find the syntax documentation from Microsoft here.
Please note that this is different from defining measures or calculated columns inside a tabular model. Expressions for measures or calculated columns should always evaluate to a scalar value.