Error in Dax Studio when using Countrows #395
Unanswered
Declan1984
asked this question in
🙋♀️TE3 Q&A
Replies: 1 comment
|
COUNTROWS returns a scalar value. The expression following EVALUATE must return a table value. For example, this doesn’t work either: But this works: (Going forward, please keep the questions asked here on the topic of Tabular Editor). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I spent a fair bit of time trying to troubleshoot an error with a simple COUNTROWS function when using Dax Studio. When defining a measure like:
DEFINE
test_measure = COUNTROWS('test_table')
EVALUATE
test_measure
The query kept returning: "The expression specified in the query is not a valid table expression"
I found the solution here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/The-expression-specified-in-the-query-is-not-a-valid-table/m-p/889744#M7817
The result needed to be wrapped like follows:
ROW("Result",test_measure)
Does anyone know why this is and does this only apply to COUNTROWS?
All reactions