This project has moved and is read-only. For the latest updates, please go here.


Expects table expression when using a table



I've written the following simple query:


which I believe should just return the number of rows within the Date table.

Yet in running the command I get the following errors:

"The function expects a table expression for argument ", but a string or numeric expression was used."


"An unexpected exception occurred"

Any thoughts on why this would be happening?
Closed Aug 15 at 6:29 AM by dgosbell
No response to request for more information


dgosbell wrote Jun 5 at 1:49 AM

The first error is not coming from DAX Studio, that is coming back from the Tabular engine. I can't see what would be causing that, I'm guessing it's something in your model as I can't reproduce it on my machine. I can only reproduce that error by using double quotes around the table name, but your example clearly has single quotes.

What version and type of data source are you running this against? (Analysis Services/Power BI/PowerPivot)

The second error is not specific enough to know if it's coming from the data source or from DAX Studio. Is the same query sometimes causing both errors? That sounds strange as running the same query should return the same result. You could try turning on the application logging (see Logging settings) and reproduce the issue and then attach a copy of the log to this issue and I can see if it gives me any more hints as to what's going on.

wrote Aug 15 at 6:29 AM