Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Community,
I recenly encountered this error within the last several days when connecting to a Power BI dataset using Power BI report builder, I have the lastest version of Power BI report builder (Sep 2020).
TITLE: Power BI Report Builder
------------------------------
Query preparation failed.
------------------------------
ADDITIONAL INFORMATION:
Object reference not set to an instance of an object. (MDXQueryGenerator)
------------------------------
BUTTONS:
OK
------------------------------
However, if I took out the RSCustomDaxFilter function in my DAX query below, it works fine. Does anyone have any suggestions on how to fix this error?
EVALUATE
SUMMARIZECOLUMNS (
'Dimension Date'[Date],
'PMC List'[PMC Name],
'Property List'[Property Name],
RSCustomDaxFilter(@DimensionDateDate,EqualToCondition,[Date].[Date],String),
RSCustomDaxFilter(@PMCListPMCName,EqualToCondition,[PMC List].[PMC Name],String),
RSCustomDaxFilter(@PropertyName,EqualToCondition,[Property List].[Property Name],String),
"Contracted Amount", SUM('Monthly Line Item'[Contracted Amount]),
"CountLeads", SUM ( 'Leads Summary'[CountLeads]),
"Billed Revenue", [Billed Revenue],
"Properties", [Properties],
"CPL", [CPL],
"Penetration Rate", [Penetration Rate],
"LPP", [LPP],
"Total Properties", [Total Properties],
"Properties Listing", [Properties Listing],
"ARPP", [ARPP])
In my experience, using dataset parameters in the Query Designer with DAX is a poor experience. It does not seem to be able to use the parameters defined in the dataset and you must re-define them again in the Query Designer Query Parameters pop up. Further, when I open an existing query with parameters in the Query Designer, I *always* get a message like the OP references. I don't know if this is because the Query Designer has "forgotten" that it is using DAX and not MDX (a guess based off the reference to MDX, which I have never used).
The simplest work around I have used is to select the entire query, switch from DAX to MDX and back, clicking OK when it warns about losing everything, pasting the query back in, and re-creating the parameters, which are also erased.
This is still occurring in 15.7.1704.1
Hi @Anonymous , Were you able to resolved this? I am getting the same error.
Thanks
Hi @Anonymous,
Did you apply any change to your system environment or Datasource/connector driver?
If this issue appears without nothing changes on your device, I'd like to suggest you contact to power bi team with your pbix file for further support.
Regards,
Xiaoxin Sheng
The code I used was modified from the codes generated by Report Builder. It worked fine until several days ago when the error started to happen.
If you would like to try out a pre-release build that may have a fix, I put it here. https://microsoft-my.sharepoint.com/:u:/p/bradsy/EQh132NkvCdFgIVchpz4iGgB-ZKBuAgpN3SfuaX7DVkBdQ
If that does not fix it, if you can provide a generic repro, we can take a look at it.