Forum Discussion
DataSource.Error: AnalysisServices: Response status code does not indicate success: 400 (Bad Request
- 1 year ago
Hi TotalAnonymous,
Thank you for your detailed explanation. Since the scheduled refresh in the Power BI Service is working fine, but the error only appears when opening Power Query, this suggests that the issue is likely related to Power Query metadata caching or local connection settings rather than the DAX query itself.
please try the following steps:- Sometimes, simply closing and reopening Power Query Editor can force a metadata refresh.
- In Power Query Editor, click Data source settings. Select your Analysis Services connection and click Edit Permissions. Re-enter your credentials and apply the changes.
- Open Power Query Editor, click on Advanced Editor in the Home tab, review the Source step to ensure the query is pointing to the correct tables and fields. If necessary, update the query to match the latest structure in Analysis Services.
- Click Clear Cache and restart Power BI Desktop and check you are using the latest version of Power BI Desktop, as compatibility issues might cause errors.
If this helps, please “Accept it as a Solution” and give it a “Kudos” to assist others in the community.
Thank you. - 1 year ago
Hi TotalAnonymous,
You're welcome. I'm glad the information was helpful.That "works on first attempt, but fails on refresh preview" behaviour is actually something we see occasionally with Analysis Services connections. It often relates to metadata caching or session-specific inconsistencies in Power BI Desktop.
- In powerbi desktop navigate to File > Options and settings > Options. In the left pane, under Global, select Data Load. Click the Clear Cache button under Data Cache Management Options and Restart Power BI Desktop afterward to ensure a clean state.
This forces Power BI to drop any cached schema or preview data and fetch it fresh which often helps when the model has changed behind the scenes or when there’s a mismatch in expectations between Power Query and Analysis Services.
If this helps, please mark it as “Accepted Solution” and feel free to give a “Kudos” to help others in the community as well.
Thank you.
Hi v-ssriganesh , thanks for your answer!
I have a question. If the relationship between the table has been updated/changed in the Analysis Service, does it impact to the query and produce the same error? thank you!
Hi TotalAnonymous,
Yes, if the relationship between tables has been updated or changed in Analysis Services, it can impact the query and potentially cause the same error.
Changes such as renaming, removing, or modifying relationships can affect how the DAX query retrieves data, leading to issues in Power Query. If the query relies on specific relationships that no longer exist or behave differently, it may result in a 400 (Bad Request) error.
If you find this information useful, please “Accept it as a solution” and give it a 'Kudos' to assist others in locating it easily.
Thank you.
- TotalAnonymous1 year ago
Helper III
Hi v-ssriganesh ,
Thanks for your answer. However, I have used this DAX Query in a report that I have published in premium workspace before. The weird thing is the schedule refresh of the report is running smoothly. The data also updated correctly and I don't face the above error expression/notification in the workspace.
I only face the error when I try to open the Power Query of that report. I just wondering that this kind of error should be appeared in scheduled refresh as well. But, it turns out that I only face the error in Power Query.- v-ssriganesh1 year ago
Community Support
Hi TotalAnonymous,
Thank you for your detailed explanation. Since the scheduled refresh in the Power BI Service is working fine, but the error only appears when opening Power Query, this suggests that the issue is likely related to Power Query metadata caching or local connection settings rather than the DAX query itself.
please try the following steps:- Sometimes, simply closing and reopening Power Query Editor can force a metadata refresh.
- In Power Query Editor, click Data source settings. Select your Analysis Services connection and click Edit Permissions. Re-enter your credentials and apply the changes.
- Open Power Query Editor, click on Advanced Editor in the Home tab, review the Source step to ensure the query is pointing to the correct tables and fields. If necessary, update the query to match the latest structure in Analysis Services.
- Click Clear Cache and restart Power BI Desktop and check you are using the latest version of Power BI Desktop, as compatibility issues might cause errors.
If this helps, please “Accept it as a Solution” and give it a “Kudos” to assist others in the community.
Thank you.- v-ssriganesh1 year ago
Community Support
Hi TotalAnonymous,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.