Forum Discussion
MDXQueryGenerator error when connecting to Power BI dataset in Power BI report builder
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])
7 Replies
- AnonymousNot applicable
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
- GilbertQ
Super User
What happens if you update it to use the code below instead of the generator? - AnonymousNot applicable
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
- AnonymousNot applicable
Hi Anonymous , Were you able to resolved this? I am getting the same error.
Thanks