<?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 DAX why the error when the focus has changed in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-why-the-error-when-the-focus-has-changed/m-p/3383983#M127496</link>
    <description>&lt;P&gt;sql programmer having 'fun' with dax :}&amp;nbsp; &amp;nbsp; Current post while trying to get a query to work, &lt;A title="dax ... the only good dax is a ..." href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-syntax/m-p/3382566#M127455" target="_blank" rel="noopener"&gt;dax syntax&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now different question, why the exact same query works for one return and not the other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pml var return focus&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pml_id return focus&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hilarious, now expand the query and new focus works!?&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;==================================================================&lt;/P&gt;
&lt;P&gt;Why no data returned when&amp;nbsp;&amp;nbsp;'Measure Benefit Master'[PM IDId] = 3921&amp;nbsp; in the dataset shows 4 rows?&lt;/P&gt;
&lt;P&gt;Try with direct literal.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;dataset table mbm.PM IDId&amp;nbsp; filtered for 3921&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp; answer is lack of data integrity in the data,&amp;nbsp; &amp;nbsp;'Measure Benefit Master'[DIR] = "CO"&amp;nbsp; &amp;nbsp;has different values, remove and working :}&lt;/P&gt;
&lt;P&gt;==================================================================&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2023 01:33:29 GMT</pubDate>
    <dc:creator>garythomannCoGC</dc:creator>
    <dc:date>2023-08-17T01:33:29Z</dc:date>
    <item>
      <title>DAX why the error when the focus has changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-why-the-error-when-the-focus-has-changed/m-p/3383983#M127496</link>
      <description>&lt;P&gt;sql programmer having 'fun' with dax :}&amp;nbsp; &amp;nbsp; Current post while trying to get a query to work, &lt;A title="dax ... the only good dax is a ..." href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/dax-syntax/m-p/3382566#M127455" target="_blank" rel="noopener"&gt;dax syntax&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now different question, why the exact same query works for one return and not the other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pml var return focus&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pml_id return focus&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hilarious, now expand the query and new focus works!?&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;==================================================================&lt;/P&gt;
&lt;P&gt;Why no data returned when&amp;nbsp;&amp;nbsp;'Measure Benefit Master'[PM IDId] = 3921&amp;nbsp; in the dataset shows 4 rows?&lt;/P&gt;
&lt;P&gt;Try with direct literal.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;dataset table mbm.PM IDId&amp;nbsp; filtered for 3921&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp; answer is lack of data integrity in the data,&amp;nbsp; &amp;nbsp;'Measure Benefit Master'[DIR] = "CO"&amp;nbsp; &amp;nbsp;has different values, remove and working :}&lt;/P&gt;
&lt;P&gt;==================================================================&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 01:33:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-why-the-error-when-the-focus-has-changed/m-p/3383983#M127496</guid>
      <dc:creator>garythomannCoGC</dc:creator>
      <dc:date>2023-08-17T01:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX why the error when the focus has changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-why-the-error-when-the-focus-has-changed/m-p/3385180#M127553</link>
      <description>&lt;P&gt;Just catching up with your question here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;One key point: DAX queries can only return tables, not scalar values.&lt;/P&gt;
&lt;P&gt;So &lt;STRONG&gt;RETURN pml&lt;/STRONG&gt; will result in an error in the above queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contrast with measures that must return scalar values.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 11:54:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-why-the-error-when-the-focus-has-changed/m-p/3385180#M127553</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-08-17T11:54:12Z</dc:date>
    </item>
  </channel>
</rss>

