Forum Discussion

TotalAnonymous's avatar
TotalAnonymous
Helper III
1 year ago
Solved

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)



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!

  • v-ssriganesh's avatar
    v-ssriganesh
    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.

  • v-ssriganesh's avatar
    v-ssriganesh
    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.

11 Replies

  • v-ssriganesh's avatar
    v-ssriganesh
    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.

    • TotalAnonymous's avatar
      TotalAnonymous
      Helper III

      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!

      • v-ssriganesh's avatar
        v-ssriganesh
        Community Support

        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.

  • v-ssriganesh's avatar
    v-ssriganesh
    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's avatar
    v-ssriganesh
    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's avatar
    v-ssriganesh
    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.