<?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: Why is the Power BI REST API saving a query result as a string? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5325249#M65408</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the response and confirming that you are using power automate desktop.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;After Run a query against a dataset, add Convert JSON to custom object action to convert the API response into a custom object. After that you can access the returned data, loop through the firstTableRows and write each record to excel instead of writing the raw json response.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For reference, follow the below documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/variables" target="_blank"&gt;Variables actions reference - Power Automate | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2026 11:52:30 GMT</pubDate>
    <dc:creator>v-achippa</dc:creator>
    <dc:date>2026-07-28T11:52:30Z</dc:date>
    <item>
      <title>Why is the Power BI REST API saving a query result as a string?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5318167#M65392</link>
      <description>&lt;P&gt;&lt;SPAN&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. The matrix looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Campaign&lt;/TD&gt;&lt;TD&gt;Mailed&lt;/TD&gt;&lt;TD&gt;Opened&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;TD&gt;238096&lt;/TD&gt;&lt;TD&gt;118801&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;TD&gt;198519&lt;/TD&gt;&lt;TD&gt;98489&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC&lt;/TD&gt;&lt;TD&gt;195848&lt;/TD&gt;&lt;TD&gt;100218&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;632463&lt;/TD&gt;&lt;TD&gt;317508&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've set up a flow in Power Automate using the Power BI REST API to run the query. The flow looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Run a query against a dataset&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Launch Excel&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Write to Excel worksheet&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Save Excel&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;The flow runs successfully, but when I open the resulting spreadsheet it just contains this string in cell A1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"results":[{"tables":[{"rows":[{"Table[Campaign]":"AAA","[SumMailed]":238096.0,"[SumOpened]":118801.0},{"Table[Campaign]":"BBB","[SumMailed]":198519.0,"[SumOpened]":98489.0},{"Table[Campaign]":"CCC","[SumMailed]":195848.0,"[SumOpened]":100218.0}]}]}],"firstTableRows":[{"Table[Campaign]":"AAA","[SumMailed]":238096.0,"[SumOpened]":118801.0},{"Table[Campaign]":"BBB","[SumMailed]":198519.0,"[SumOpened]":98489.0},{"Table[Campaign]":"CCC","[SumMailed]":195848.0,"[SumOpened]":100218.0}]}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know how I can have the query results save into a spreadsheet in tabular format please?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If it helps, here is my DAX:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EVALUATE&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TOPN(501, SUMMARIZECOLUMNS(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[Campaign],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"SumMailed", CALCULATE(SUM('Table'[Mailed])),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"SumOpened", CALCULATE(SUM('Table'[Opened]))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;), 'Table'[Campaign], 1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ORDER BY&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[Campaign]&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2026 11:40:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5318167#M65392</guid>
      <dc:creator>SRJPBI</dc:creator>
      <dc:date>2026-07-24T11:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Power BI REST API saving a query result as a string?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5322414#M65398</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to Microsoft Fabric Community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here looks like this is expected, the "Run a query against a dataset" action returns its result in JSON format, not as a table. Since your flow writes the raw response directly to excel, the entire JSON is being stored as a single string in cell A1.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To get the data in tabular format, add a Parse JSON action after Run a query against a dataset and extract the rows first and then write those rows to excel, instead of writing the raw response directly. Once the rows are parsed and mapped to columns, the data will save in proper tabular format.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For reference, please follow the below documentation:&lt;/P&gt;
&lt;P&gt;&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;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2026 09:26:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5322414#M65398</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-07-27T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Power BI REST API saving a query result as a string?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5322444#M65399</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/882907"&gt;@v-achippa&lt;/a&gt;&amp;nbsp;Thanks for the explanation; that makes sense. However, I am using Power Automate Desktop, which I don't believe has the function Parse JSON. Is there a way to do this in the Desktop version please?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2026 09:45:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5322444#M65399</guid>
      <dc:creator>SRJPBI</dc:creator>
      <dc:date>2026-07-27T09:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Power BI REST API saving a query result as a string?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5325249#M65408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the response and confirming that you are using power automate desktop.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;After Run a query against a dataset, add Convert JSON to custom object action to convert the API response into a custom object. After that you can access the returned data, loop through the firstTableRows and write each record to excel instead of writing the raw json response.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For reference, follow the below documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/variables" target="_blank"&gt;Variables actions reference - Power Automate | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;Anjan Kumar Chippa&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2026 11:52:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5325249#M65408</guid>
      <dc:creator>v-achippa</dc:creator>
      <dc:date>2026-07-28T11:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Power BI REST API saving a query result as a string?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5325256#M65410</link>
      <description>&lt;P&gt;As far as I know, "Show data point as a table" isn't available for all visuals in the Power BI Service, even though it is in Power BI Desktop. The Desktop and Service don't always offer the same context menu options, especially for map visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you mentioned this used to work for the same report, I'd first check whether anything has changed recently, such as the visual type, tenant settings, or a recent Power BI Service update. If nothing has changed on your end, it could also be a regression in the Service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, you could use Drillthrough, a report page tooltip, or a table visual that responds to the map selection, depending on the experience you're trying to provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd be interested to hear if others can still reproduce this in the current version of the Power BI Service.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2026 11:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-the-Power-BI-REST-API-saving-a-query-result-as-a-string/m-p/5325256#M65410</guid>
      <dc:creator>DataTako</dc:creator>
      <dc:date>2026-07-28T11:55:42Z</dc:date>
    </item>
  </channel>
</rss>

