<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5180564#M65056</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/619967"&gt;@SRJPBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 May 2026 04:15:36 GMT</pubDate>
    <dc:creator>v-ssriganesh</dc:creator>
    <dc:date>2026-05-11T04:15:36Z</dc:date>
    <item>
      <title>Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5176325#M65011</link>
      <description>&lt;P&gt;I have a Power BI report that's been published into the online service. It works fine. I now want to automatically extract data from a matrix within the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a flow in Power Automate to do this: I copied the DAX behind the matrix from Power BI's Performance Analyzer, and pasted it into a variable within my flow. I then created a task to&amp;nbsp;use the Power BI REST API to run a query against the report's dataset, setting my variable as the query text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the task gives me this error when I run it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Cloud connector call failed with status code 'BadRequest'.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why this might be happening and how I can fix it please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 14:50:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5176325#M65011</guid>
      <dc:creator>SRJPBI</dc:creator>
      <dc:date>2026-04-30T14:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5176372#M65012</link>
      <description>&lt;P&gt;I think the BadReq comes from the visual DAX dragging calc‑lineage the API can’t read,&lt;BR /&gt;so keep only the one EVALUATE table that returns rows—if it still breaks, run that line in DAX Studio n see what op won’t fold.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 16:08:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5176372#M65012</guid>
      <dc:creator>Kagiyama_yutaka</dc:creator>
      <dc:date>2026-04-30T16:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5177151#M65016</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/619967"&gt;@SRJPBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1550082"&gt;@Kagiyama_yutaka&lt;/a&gt;&amp;nbsp;for sharing valuable insights.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for being part of the Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 04:17:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5177151#M65016</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2026-05-04T04:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5178025#M65035</link>
      <description>&lt;P&gt;This doesn't seem to fix the issue. Here is my original code:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;// DAX Query&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;DEFINE&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;VAR __DS0Core =&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;SUMMARIZECOLUMNS(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;ROLLUPADDISSUBTOTAL('Table'[Col1], "IsGrandTotalRowTotal"),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;"SumCol2", CALCULATE(SUM('Table'[Col2])),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;"SumCol3", CALCULATE(SUM('Table'[Col3]))&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;VAR __DS0PrimaryWindowed =&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Table'[Col1], 1)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;EVALUATE&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;__DS0PrimaryWindowed&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;ORDER BY&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;[IsGrandTotalRowTotal] DESC, 'Table'[Col1]&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is what I changed it to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;// DAX Query&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;EVALUATE&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;TOPN(502, SUMMARIZECOLUMNS(&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;ROLLUPADDISSUBTOTAL('Table'[Col1], "IsGrandTotalRowTotal"),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;"SumCol2", CALCULATE(SUM('Table'[Col2])),&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;"SumCol3", CALCULATE(SUM('Table'[Col3]))&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;), [IsGrandTotalRowTotal], 0, 'Table'[Col1], 1)&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;ORDER BY&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;FONT size="2" color="#333333"&gt;&lt;EM&gt;[IsGrandTotalRowTotal] DESC, 'Table'[Col1]&lt;/EM&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both versions return the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 11:37:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5178025#M65035</guid>
      <dc:creator>SRJPBI</dc:creator>
      <dc:date>2026-05-05T11:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5179060#M65039</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/619967"&gt;@SRJPBI&lt;/a&gt;,&lt;/P&gt;
&lt;DIV&gt;Thank you for sharing the details and the updated DAX query.&lt;BR /&gt;&lt;BR /&gt;Based on the official Microsoft documentation, the Execute Queries REST API requires a valid DAX query that returns a table, typically using a single EVALUATE statement. The query pattern you’re using (DEFINE / VAR with one EVALUATE) is valid DAX syntax.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P&gt;When using this API from Power Automate, a 400 BadRequest is commonly caused by request‑formatting issues rather than the DAX logic itself:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The DAX query is sent inside a JSON request body, so any double quotes inside the DAX (for example "IsGrandTotalRowTotal") must be escaped (e.g., \"IsGrandTotalRowTotal\") to keep the JSON valid.&lt;/LI&gt;
&lt;LI&gt;Only the DAX query should be passed to the API; comments such as // DAX Query should be removed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Ensure the request body follows the documented format:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "queries": [
   { "query": "&amp;lt;DAX query text&amp;gt;" }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;In addition, please verify the documented prerequisites:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The Dataset Execute Queries REST API tenant setting is enabled.&lt;/LI&gt;
&lt;LI&gt;The calling user has Read + Build permissions on the dataset.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For troubleshooting, you can also test with a simpler SUMMARIZECOLUMNS query to confirm the API call succeeds before adding more complex logic.&lt;/P&gt;
&lt;P&gt;For your reference: &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries" target="_blank"&gt;Datasets - Execute Queries - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Ganesh Singamshetty&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2026 05:20:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5179060#M65039</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2026-05-07T05:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5179249#M65041</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thanks for the update — the rewrite isn’t the issue. the query still has visual-only stuff the API can’t read: the subtotal op, the auto-added lineage/total column, and the ORDER BY. executequeries only takes a plain table expression, so those bits have to go.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2026 10:38:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5179249#M65041</guid>
      <dc:creator>Kagiyama_yutaka</dc:creator>
      <dc:date>2026-05-07T10:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI REST API - why does my cloud connector call fail with 'BadRequest'?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5180564#M65056</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/619967"&gt;@SRJPBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2026 04:15:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-why-does-my-cloud-connector-call-fail-with/m-p/5180564#M65056</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2026-05-11T04:15:36Z</dc:date>
    </item>
  </channel>
</rss>

