Forum Discussion

Darjus's avatar
Darjus
Frequent Visitor
7 months ago
Solved

executeQueries returns ins incomplete results compared to XMLA (EVALUATE table)

 

Hello,

I am encountering an inconsistency between Power BI REST API executeQueries and XMLA/DAX Studio results on the same semantic model.

Scenario:

  • Dataset: Power BI Service semantic model (no RLS, no hidden tables/columns)

  • Connection via DAX Studio (Power BI Service / XMLA endpoint)

  • Connection via REST API:
    POST /v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/executeQueries

    Issue:
    When executing the following query:

     

     
    EVALUATE DimSource
     
    • DAX Studio (XMLA) returns 5 rows from DimSource

    • REST API executeQueries returns only 3 rows

      This is a direct table evaluation with no filters, no CALCULATE, and no measures involved.
      The dataset, table, relationships, and permissions are identical in both cases.

      The REST API returns HTTP 200 with an empty/missing subset of rows (no error or warning).

      Expectation:
      executeQueries should return the same result set as XMLA/DAX Studio for a simple EVALUATE <table> query.

      Question:
      Is this a known limitation or bug of executeQueries compared to XMLA?
      If so, is there official documentation describing this behavior, or a recommended workaround?

      Thank you.

  • Hi Darjus ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    ExecuteQueries REST API exclude properties for null or blank values by default. Unless you set serializerSettings.includeNulls = true, any column that’s blank in a row won’t be serialized in the JSON for that row. If every column in a row is blank, that row can come back as an empty {} and depending on your deserializer/viewer, it may appear as if the row is “missing”. The XMLA/DAX Studio result set does not have this JSON serialization behavior, so you see all 5 rows there.

     

    Please try below things to fix the issue.

     

    1. Use serializerSettings.includeNulls = true whenever you need XMLA/DAX Studio outputs.

    2. If you post-process the JSON, ensure your deserializer doesn’t drop empty row objects. Keep avoid nulls.

    3. For large extractions or high concurrency, use XMLA endpoints, executeQueries is limited to 100,000 rows / 1,000,000 values per query and 120 queries/min per user.

     

    Please refer below links.

    Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    ExecuteQueries REST API versus XMLA endpoints at scale | Microsoft Power BI Blog | Microsoft Power BI

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh

     

4 Replies

  • v-dineshya's avatar
    v-dineshya
    Icon for Community Support rankCommunity Support

    Hi Darjus ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    ExecuteQueries REST API exclude properties for null or blank values by default. Unless you set serializerSettings.includeNulls = true, any column that’s blank in a row won’t be serialized in the JSON for that row. If every column in a row is blank, that row can come back as an empty {} and depending on your deserializer/viewer, it may appear as if the row is “missing”. The XMLA/DAX Studio result set does not have this JSON serialization behavior, so you see all 5 rows there.

     

    Please try below things to fix the issue.

     

    1. Use serializerSettings.includeNulls = true whenever you need XMLA/DAX Studio outputs.

    2. If you post-process the JSON, ensure your deserializer doesn’t drop empty row objects. Keep avoid nulls.

    3. For large extractions or high concurrency, use XMLA endpoints, executeQueries is limited to 100,000 rows / 1,000,000 values per query and 120 queries/min per user.

     

    Please refer below links.

    Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    ExecuteQueries REST API versus XMLA endpoints at scale | Microsoft Power BI Blog | Microsoft Power BI

     

    I hope this information helps. Please do let us know if you have any further queries.

     

    Regards,

    Dinesh

     

    • v-dineshya's avatar
      v-dineshya
      Icon for Community Support rankCommunity Support

      Hi Darjus ,

      We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

       

      Regards,

      Dinesh

      • v-dineshya's avatar
        v-dineshya
        Icon for Community Support rankCommunity Support

        Hi @Darjus ,

        We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

         

        Regards,

        Dinesh