I’m working with a client who wants to reduce the execution time of my application when making multiple DAX calls.
Currently, the flow is:
- I use an LLM to generate a DAX query based on report descriptions.
- Then, I use the
Adomdpackages in .NET to connect to Azure Analysis Services (AAS) and execute the DAX queries.
The application is hosted on Azure App Services, so I don't have a local environment where I can create a dummy model with empty data and just the measures. The Power BI data and models are managed entirely by the client — I only have access via a connection string.
The problem is:
- Sometimes the queries fail due to syntax or semantic errors.
Now, the client wants us to validate the DAX before we hit AAS using a .NET-based Power BI package that can catch invalid DAX.
He wants to avoid hitting AAS altogether if the DAX is invalid, as that adds latency. The idea is to reduce time spent waiting on errors from the server.
I’ve searched for a package or API that can validate DAX offline (without requiring a connection to Power BI or AAS), but I haven’t found anything. The only semi-relevant resource I found was this:
https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-organization-app
However, it doesn’t seem applicable in my case, as I don’t have access to host or modify the dataset/model.
I'm also concerned that trying to validate DAX locally might increase overhead. I'd essentially be opening two connections per DAX query: one to validate, and another to execute — which might end up being slower than just failing fast on execution.
I've raised these concerns, but the client still insists on finding a way to pre-validate the DAX.
I'm stuck at this point and not sure how to proceed. Has anyone faced a similar requirement? Is there a way to validate DAX queries in .NET without opening a connection to AAS or Power BI?
Any suggestions or workarounds would be greatly appreciated.