<?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 Assistance Required with Query Performance Issue in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212615#M167016</link>
    <description>&lt;P&gt;I am currently facing an issue where the DAX query runs successfully with SQL Server as the data source. However, when using a data flow as the source, the query exceeds the time limit.&lt;/P&gt;&lt;P&gt;Could you please assist me in identifying why this discrepancy is occurring and recommend any potential solutions to improve performance in the data flow environment?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Corporate Cust Current Year Sales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Corporate Cust Current Year Rank]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;'Top N Range'&lt;/SPAN&gt;&lt;SPAN&gt;[Top N Range Value]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Current Year Qty]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;HASONEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;) = &lt;/SPAN&gt;&lt;SPAN&gt;"Others"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Current Year Qty]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Corporate Cust Current Year Rank]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;'Top N Range'&lt;/SPAN&gt;&lt;SPAN&gt;[Top N Range Value])))&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 02 Oct 2024 15:57:29 GMT</pubDate>
    <dc:creator>Pavan_123456789</dc:creator>
    <dc:date>2024-10-02T15:57:29Z</dc:date>
    <item>
      <title>Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212615#M167016</link>
      <description>&lt;P&gt;I am currently facing an issue where the DAX query runs successfully with SQL Server as the data source. However, when using a data flow as the source, the query exceeds the time limit.&lt;/P&gt;&lt;P&gt;Could you please assist me in identifying why this discrepancy is occurring and recommend any potential solutions to improve performance in the data flow environment?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Corporate Cust Current Year Sales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Corporate Cust Current Year Rank]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;'Top N Range'&lt;/SPAN&gt;&lt;SPAN&gt;[Top N Range Value]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Current Year Qty]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;HASONEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;) = &lt;/SPAN&gt;&lt;SPAN&gt;"Others"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Current Year Qty]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Unique Customers'&lt;/SPAN&gt;&lt;SPAN&gt;[CORPORATE_CUSTOMER]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Corporate Cust Current Year Rank]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;'Top N Range'&lt;/SPAN&gt;&lt;SPAN&gt;[Top N Range Value])))&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:57:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212615#M167016</guid>
      <dc:creator>Pavan_123456789</dc:creator>
      <dc:date>2024-10-02T15:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212721#M167017</link>
      <description>&lt;LI-CODE lang="markup"&gt;where the DAX query runs successfully with SQL Server as the data source. However, when using a data flow as the source, the query exceeds the time limit.&lt;/LI-CODE&gt;
&lt;P&gt;Was that SQL Server data source accessed in Direct Query mode?&amp;nbsp; Is the dataflow accessed in import mode?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:21:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212721#M167017</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-02T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212835#M167020</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for your response.&lt;BR /&gt;both the SQL Server and the data flow are accessed in Import mode, not DirectQuery.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:59:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212835#M167020</guid>
      <dc:creator>Pavan_123456789</dc:creator>
      <dc:date>2024-10-02T16:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212845#M167021</link>
      <description>&lt;P&gt;In that case the data source shoud not matter as in both scenarios your query is running as a DAX query against the semantic model, and not against the original source in Direct Query mode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use DAX Studio to examine the query plan and make adjustments.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 17:04:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4212845#M167021</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-02T17:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214004#M167047</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I’ve encountered a performance issue when running the same DAX query across two different data sources. When I run the query against our SQL data source, it completes in about 393 ms. However, when running the same query against the Data Flow as the data source, it takes significantly longer—around 34 seconds (34,000 ms).&lt;/P&gt;&lt;P&gt;I’m unsure why this discrepancy is occurring. Could you please help me understand what might be causing the slower performance when using the Data Flow source? Any guidance or suggestions on how to optimize the query Please Help me.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 05:52:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214004#M167047</guid>
      <dc:creator>Pavan_123456789</dc:creator>
      <dc:date>2024-10-03T05:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214147#M167054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="658720" data-lia-user-login="Pavan_123456789" class="lia-mention lia-mention-user"&gt;Pavan_123456789&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, Dataflow handles query differently than SQL Server. Often the choice is to use DirectQuery with dataflow.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If your data source is a large dataset, you may choose to build aggregated tables into the model to improve performance and retain detail data where necessary. &lt;STRONG&gt;Please note that this only applies to Premium or Premium Per User as you need to be able to turn on Enhanced Compute Engine Settings for Dataflow.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details, you can refer to below document:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-directquery" target="_blank"&gt;Using DirectQuery with dataflows - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-premium-features" target="_blank"&gt;Premium features of dataflows - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/aggregations-advanced" target="_blank"&gt;User-defined aggregations - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:20:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214147#M167054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-03T07:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214214#M167057</link>
      <description>&lt;P&gt;HI&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I wanted to clarify that I currently have the option to use only the Pro license.&lt;/P&gt;&lt;P&gt;If you have any suggestions or additional information regarding this, I would greatly appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:53:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214214#M167057</guid>
      <dc:creator>Pavan_123456789</dc:creator>
      <dc:date>2024-10-03T07:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance Required with Query Performance Issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214654#M167070</link>
      <description>&lt;P&gt;These results are weird. Can you please show the data model in each case?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 11:50:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Assistance-Required-with-Query-Performance-Issue/m-p/4214654#M167070</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-03T11:50:45Z</dc:date>
    </item>
  </channel>
</rss>

