Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TotalAnonymous
Helper II
Helper II

DataSource.Error: AnalysisServices: Response status code does not indicate success: 400 (Bad Request

Dear community,

 

I hope you're doing well. I have a question regarding the Analysis Service Connector in Power Query.

 

Recently, I receive this type of error called "DataSource.Error: AnalysisServices: Response status code does not indicate success: 400 (Bad Request)." when I'm trying to adjust the step in Power Query (as shown in the attached image)

 

However, it's interesting because in the last week I checked the Power Query this kind of error didn't exist (I used same DAX Query to import data from Analysis Service)

TotalAnonymous_0-1742870191893.png



For your information, this kind of error is not happened in the report that used the same DAX Query in the Power BI Service. Therefore, I just wondering why the error is occured when I try to adjust the step in the Power Query. 

Have you ever experienced this before? Please kindly let me know your suggestion/ideas. Thank you so much!

2 ACCEPTED SOLUTIONS

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.

View solution in original post

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.

vssriganesh_0-1743999288088.png

 

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.

View solution in original post

11 REPLIES 11
v-ssriganesh
Community Support
Community Support

Hi @TotalAnonymous,
Could you please confirm if your query have been resolved by the solution provided by? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

v-ssriganesh
Community Support
Community Support

Hi @TotalAnonymous,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-ssriganesh
Community Support
Community Support

Hi @TotalAnonymous,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-ssriganesh
Community Support
Community Support

Hi @TotalAnonymous ,
Thank you for bringing your query to the Microsoft Fabric Community Forum.

After thoroughly reviewing the details and the screenshot you provided, here are some suggestions to help troubleshoot and resolve the issue:

  • Double-check the DAX query syntax. Small syntax errors can cause failures, so review the query carefully.
  • Go over the connector configuration. Ensure the server name, database name, and connection details are correct, and verify the right authentication method is being used.
  • Keep Power Query and Analysis Services up to date. Running the latest versions of Power BI Desktop and Analysis Services can help avoid compatibility issues.
  • If a gateway is involved, confirm that it's properly installed and running, the right credentials are in place, and it's accessible from Power BI Service.

If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
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.

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.

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

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.

vssriganesh_0-1743999288088.png

 

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 @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.

Helpful resources

Announcements
Join our Fabric User Panel

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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors