Here is a common problem statement: I am using SAP BW Connector available in Power BI with import mode. When I either connect or refresh data, I get a MDX error and I need to make sense of it. How did I get the underlying MDX statement and debug through the issue… Here’s how.
Create an environment variable, PBI_EnableSapBwTracing and set it to true.
Open Power BI Desktop file and navigate to File -> Options and Settings -> Options -> Diagnostics.
Select Open crash dump/traces folder.
This opens the trace folder.
Now refresh the report or create a new query.
Notice trace files are created with the MDX query. Open this file and copy the MDX statement.
Open SAP GUI and use tcode MDXTEST.
Paste the MDX statement and execute it. You will get more details and work through the issue.