<?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 Measure is not working in Direct Query mode in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3340310#M125351</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am attempting to switch one table in my Power BI report from Import mode to DirectQuery mode.&lt;/P&gt;&lt;P&gt;The below measure code works correctly in Import mode but returns blank values in DirectQuery mode. Interestingly, when I manually input the property_id I use for filtering instead of using a variable, it works fine:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here are the two tables I am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the DAX code&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have verified that the property_id is returning the expected IDs.&lt;/P&gt;&lt;P&gt;Any assistance you can provide on this matter would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 08:23:04 GMT</pubDate>
    <dc:creator>izineela</dc:creator>
    <dc:date>2023-07-20T08:23:04Z</dc:date>
    <item>
      <title>Measure is not working in Direct Query mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3340310#M125351</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am attempting to switch one table in my Power BI report from Import mode to DirectQuery mode.&lt;/P&gt;&lt;P&gt;The below measure code works correctly in Import mode but returns blank values in DirectQuery mode. Interestingly, when I manually input the property_id I use for filtering instead of using a variable, it works fine:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here are the two tables I am using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the DAX code&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have verified that the property_id is returning the expected IDs.&lt;/P&gt;&lt;P&gt;Any assistance you can provide on this matter would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 08:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3340310#M125351</guid>
      <dc:creator>izineela</dc:creator>
      <dc:date>2023-07-20T08:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Measure is not working in Direct Query mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3345627#M125615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="591784" data-lia-user-login="izineela" class="lia-mention lia-mention-user"&gt;izineela&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue may caused by the function&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dax/firstnonblank-function-dax" target="_self"&gt;FIRSTNONBLANK.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.&lt;/P&gt;
&lt;P&gt;You may need to modify your dax and use somthing else to replace it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 03:03:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3345627#M125615</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2023-07-24T03:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Measure is not working in Direct Query mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3346667#M125661</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403972" data-lia-user-login="v-jianboli-msft" class="lia-mention lia-mention-user"&gt;v-jianboli-msft&lt;/a&gt;, I attempted to use MAX instead, but the same error persists. Interestingly, when I output property_id, it appears to be populated correctly.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 13:51:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-is-not-working-in-Direct-Query-mode/m-p/3346667#M125661</guid>
      <dc:creator>izineela</dc:creator>
      <dc:date>2023-07-24T13:51:08Z</dc:date>
    </item>
  </channel>
</rss>

