- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DAX Query fails to prepare
Hi,
I have a report that is based on a DAX query. The DAX Query works fine in DAX Studio and runs in ~1 second.
This query has one parameter. In the query editor, I tried with the parameter:
RSCustomDaxFilter(@CalendarFiscalYear,EqualToCondition,[Calendar].[Fiscal Year],String)
or by replacing with a fixed filter:
FILTER (
'Calendar',
'Calendar'[Fiscal Year] = "FY 2020"
)
When I execute this query (with or without the parameter), I have an error message :
TITLE: Power BI Report Builder
------------------------------
Query preparation failed.
------------------------------
ADDITIONAL INFORMATION:
Object reference not set to an instance of an object. (MDXQueryGenerator)
------------------------------
BUTTONS:
OK
------------------------------
This report used to work and stopped working very recently. I have no idea what happened that broke it.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like your data set has changed mode to an MDX query (I'm not sure what triggers this, but I have seen this setting change on it's own sometimes), if you switch it back to DAX it should resolve this issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this without success, I copy pasted everything (queries + tablix) in a new blank report and that works. Maybe I switched a setting somewhere or the file was corrupted. I have no idea.
Anyway, now that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm experiencing the same too. Is there any solution to this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this without success, I copy pasted everything (queries + tablix) in a new blank report and that works. Maybe I switched a setting somewhere or the file was corrupted. I have no idea.
Anyway, now that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like your data set has changed mode to an MDX query (I'm not sure what triggers this, but I have seen this setting change on it's own sometimes), if you switch it back to DAX it should resolve this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So the original issue pop up again but I have more info around its context.
Same report, I had to change the query a bit (different measure).
My query is a DAX query written with DAX Studio, not generated by the GUI. When I opened the query to change it. I had an error message about not being able to prepare the query, it couldn't execute in the query editor. I copied the query, wipped the query editor clean and switched to MDX. Then I switched back to DAX, pasted the exact same query. The query ran flawlessly in the query editor. Now the report takes ages to refresh (It never refreshed so far). It looks to me that the query editor doesn't like DAX not created by the GUI?
Not sure how to handle this. I cannot recreate the report each time something changes in the query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous - did you ever find an acceptable solution to these issues? I'm finding Power BI Report Builder, largely unusable right now.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

User | Count |
---|---|
4 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
7 | |
6 | |
5 | |
4 | |
3 |