<?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: DAX formula are not working under the direct query (7-8 crore rows in the table) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4870311#M63748</link>
    <description>&lt;LI-CODE lang="markup"&gt;The initial DAX measures was not working, so I rewrote it with optimized logic.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you know it is optimized? Did you check the query plan and server timings with DAX Studio?&lt;/P&gt;</description>
    <pubDate>Sun, 09 Nov 2025 22:05:20 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-11-09T22:05:20Z</dc:date>
    <item>
      <title>DAX formula are not working under the direct query (7-8 crore rows in the table)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4865072#M63673</link>
      <description>&lt;P&gt;Hello Everyone,&lt;BR /&gt;&lt;BR /&gt;I have written the query for the following pointers raising an issue that I'm am not able to resolve:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;I have more than &lt;STRONG&gt;7 crore records&lt;/STRONG&gt; in the table (fetching data from a SQL query) using &lt;STRONG&gt;DirectQuery mode&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The initial &lt;STRONG&gt;DAX measures&lt;/STRONG&gt; was not working, so I rewrote it with &lt;STRONG&gt;optimized logic&lt;/STRONG&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Even after optimization, the &lt;STRONG&gt;card visual keeps loading continuously&lt;/STRONG&gt; and shows an &lt;STRONG&gt;error&lt;/STRONG&gt; — what should I do?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;Please find the following dax which is optmized dax code and the format of code is written in the other measures as well:&lt;BR /&gt;&lt;BR /&gt;Original DAX :&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Patients by Chronic Condition&lt;/STRONG&gt; =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT('Billing Master'[billinfo_patientnumber]),&lt;BR /&gt;FILTER(&lt;BR /&gt;'Billing Master',&lt;BR /&gt;NOT ISBLANK('Billing Master'[testmaster_specialised])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Optmized DAX for Direct Query Mode :&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Patients by Chronic Condition&lt;/STRONG&gt; =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT('Billing Master'[billinfo_patientnumber]),&lt;BR /&gt;KEEPFILTERS(NOT ISBLANK('Billing Master'[testmaster_specialised]))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Error/Issue Screenshot&lt;/STRONG&gt; -&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pranjalagarwal1_0-1762172396076.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1307137i0AC7C64E995812A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pranjalagarwal1_0-1762172396076.png" alt="pranjalagarwal1_0-1762172396076.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;BR /&gt;Could anyone please help in resolving the issue?&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1347186"&gt;@fabriccommunity&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2025 12:40:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4865072#M63673</guid>
      <dc:creator>pranjalagarwal1</dc:creator>
      <dc:date>2025-11-03T12:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula are not working under the direct query (7-8 crore rows in the table)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4870311#M63748</link>
      <description>&lt;LI-CODE lang="markup"&gt;The initial DAX measures was not working, so I rewrote it with optimized logic.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you know it is optimized? Did you check the query plan and server timings with DAX Studio?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Nov 2025 22:05:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4870311#M63748</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-11-09T22:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula are not working under the direct query (7-8 crore rows in the table)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4871633#M63769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/527601"&gt;@pranjalagarwal1&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks for sharing the details, &amp;nbsp;since you are working with ~7–8 crore rows in DirectQuery mode, the behavior you're seeing is often related not only to the DAX logic but also to the underlying source performance, query folding, and overall model design. Even though you optimized the DAX expression, DirectQuery pushes most work down to the SQL source, so it's important to validate that the query being generated is efficient and the source has appropriate indexing. I would recommend reviewing Microsoft's official DirectQuery guidance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://learn.microsoft.com/en-us/power-bi/guidance/directquery-model-guidance" href="https://learn.microsoft.com/en-us/power-bi/guidance/directquery-model-guidance" target="_blank" rel="noreferrer noopener"&gt;DirectQuery model guidance in Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://learn.microsoft.com/en-us/power-bi/guidance/power-bi-optimization" href="https://learn.microsoft.com/en-us/power-bi/guidance/power-bi-optimization" target="_blank" rel="noreferrer noopener"&gt;Optimization guide for Power BI - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&amp;nbsp;&lt;BR /&gt;Community Support Team&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 04:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4871633#M63769</guid>
      <dc:creator>v-menakakota</dc:creator>
      <dc:date>2025-11-11T04:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula are not working under the direct query (7-8 crore rows in the table)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4875381#M63808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/527601"&gt;@pranjalagarwal1&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&amp;nbsp;&lt;BR /&gt;Community Support Team&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 08:42:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4875381#M63808</guid>
      <dc:creator>v-menakakota</dc:creator>
      <dc:date>2025-11-14T08:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX formula are not working under the direct query (7-8 crore rows in the table)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4877026#M63818</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/527601" target="_blank"&gt;@pranjalagarwal1&lt;/A&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&amp;nbsp;&lt;BR /&gt;Community Support Team&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 05:46:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-formula-are-not-working-under-the-direct-query-7-8-crore/m-p/4877026#M63818</guid>
      <dc:creator>v-menakakota</dc:creator>
      <dc:date>2025-11-17T05:46:28Z</dc:date>
    </item>
  </channel>
</rss>

