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. 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.
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. - TotalAnonymous1 year ago
Helper III
Hi v-ssriganesh ,
thanks for your answer, it's really helpful. One more thing, this is weird thing. When I try to use the same DAX code, let's say in the first attempt, it works. However when I try to refresh using refresh preview button, this kind of error appears again. About clearing cache, how can I do it? Thank you- v-ssriganesh1 year ago
Community Support
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.