<?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: Invoke-ASCmd (PowerShell) - 'Cannot find table' When Name Has Space in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4258146#M58024</link>
    <description>&lt;P&gt;I inheritied a project from a former employee and was just following their approach. The hope was to use the same approach (which works on tables without spaces); rather than redo the code.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 13:25:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-25T13:25:12Z</dc:date>
    <item>
      <title>Invoke-ASCmd (PowerShell) - 'Cannot find table' When Name Has Space</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4255392#M57996</link>
      <description>&lt;P&gt;Hi. After a few hours of searching, I'm hopeful that someone can point me in the right direction. I've got a simple PowerShell script that connects to an endpoint and runs a simple DAX query (ex: "EVALUATE (&amp;lt;mytable&amp;gt;)". The command works perfectly fine when the table name doesn't have a space; but it fails when it does:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WORKS: [xml]$resp = Invoke-ASCmd -Query &lt;STRONG&gt;"EVALUATE (&amp;lt;mytable&amp;gt;)"&lt;/STRONG&gt; -Server "powerbi://api.powerbi.com/v1.0/myorg/myorg" -Database "MyDb"&amp;nbsp; -Verbose&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FAILS: [xml]$resp = Invoke-ASCmd -Query &lt;STRONG&gt;"EVALUATE ('&amp;lt;another table&amp;gt;')"&lt;/STRONG&gt; -Server "powerbi://api.powerbi.com/v1.0/myorg/anotherorg" -Database "AnotherDB"&amp;nbsp; -Verbose&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried enclosing the table name in different quoting variations with no success. I've also run the same DAX query (with single quotes around the table name) in PowerBI desktop and everything is fine.&amp;nbsp; PowerShell version didn't impact anything (tried with both 5.1 &amp;amp; 7). It should work; but it just doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance from the community would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 06:52:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4255392#M57996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-24T06:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-ASCmd (PowerShell) - 'Cannot find table' When Name Has Space</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4256481#M58004</link>
      <description>&lt;P&gt;Why Invoke-ASCmd?&amp;nbsp; Why not&amp;nbsp;&amp;nbsp;Invoke-PowerBIRestMethod ?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2024 14:44:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4256481#M58004</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-24T14:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-ASCmd (PowerShell) - 'Cannot find table' When Name Has Space</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4258146#M58024</link>
      <description>&lt;P&gt;I inheritied a project from a former employee and was just following their approach. The hope was to use the same approach (which works on tables without spaces); rather than redo the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 13:25:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4258146#M58024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-25T13:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke-ASCmd (PowerShell) - 'Cannot find table' When Name Has Space</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4258217#M58025</link>
      <description>&lt;P&gt;Redo the code. You will see better performance too.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 14:05:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Invoke-ASCmd-PowerShell-Cannot-find-table-When-Name-Has-Space/m-p/4258217#M58025</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-25T14:05:51Z</dc:date>
    </item>
  </channel>
</rss>

