Forum Discussion
DAX Studio issues and questions (Query Batch Completed with errors)
Hey All,
Lately, I have started to use Dax Studio. Installed latest version 2.9.2
First issue is that I am not able to run the DAX code.
I am getting the following errors and server time tab remains 0.
What is the issue? How can it be resolved?
Second question is about optimisation.
According to this thread, it is possible to get optimisation suggestions?
I also use DAX Studio to check where my DAX statements can be optimized from a performance point of view
Is that true? If so, how?
Cheers!
A
Anonymous wrote:Is DAX Studio capable of suggesting better/optimised DAX code?
No, at the moment we just provide an easier way to access a deeper level of information about the execution of a given query (such as the details around the Storage Engine queries) and access to Query Plans. It would be nice to add the ability for DAX Studio to suggest improvements, but it's a very difficult problem to solve well.
5 Replies
- d_gosbell
Super User
The first error "the end of input was reached" is your problem it means you have not submitted a fully formed DAX query. The simplest form of query is as follows:
EVALUATE <table function>
Where <table function> could be a table name or any function that returns a table (eg. FILTER, SELECTCOLUMNS, SUMMARIZECOLUMNS, CROSSJOIN, ADDCOLUMNS, etc)
So you could do something like the following to output your entire "Customers" tableEVALUATE Customers
or something like the following to output all customers with a first name of "John" (because the FILTER() function returns a table)
EVALUATE FILTER(Customers, Customer[First Name] = "John")
There are some examples of using DAX Studio to debug performance issues on our videos page:
https://daxstudio.org/documentation/videos/
Or you could check out the following presentation https://www.youtube.com/watch?v=B-h3Pohtn1Y
- AnonymousNot applicable
Hi d_gosbell
Thanks for your answer.
In that case, how shold I evaluate a measure or a calculated column performance?
It is not returning a table but a value of some kind.Any advise on that area?
Cheers!
A- d_gosbell
Super User
Anonymous wrote:In that case, how shold I evaluate a measure or a calculated column performance?
Calculated columns are calculated at processing time, not at query time. So they would impact on data refresh performance, but not on the performance of your report.
But you could do something like :
EVALUATE ADDCOLUMNS( table, "myCalc", <your calc column expression goes here> )
And compare that to the performance of a query without the column
eg.
EVALUATE table
For measures the simplest thing you could do is something like the following using the curly braces to generate an inline table
EVALUATE { [MeasureName] }That will run your measure, but only evaluates a single cell. It's probably more realistice to capture the queries from Power BI Desktop and run those in DAX Studio (the youtube video link I posted shows how to do this)