<?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 Optimization help request in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3637037#M140720</link>
    <description>&lt;P&gt;hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE
VAR CA =
addcolumn(
all('FACT_SALES'[CLIENT_ID]),
"client_xx",
IF (
  CALCULATE (
     SUM ( 'FACT_SALES'[MONTANTNET] ),
     USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )
  ) &amp;gt; 0.00001,
1,
0
))
RETURN
SUMX ( CA, [client_xx] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jan 2024 06:35:32 GMT</pubDate>
    <dc:creator>Dangar332</dc:creator>
    <dc:date>2024-01-13T06:35:32Z</dc:date>
    <item>
      <title>DAX Optimization help request</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3636772#M140705</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a query that take timeout error, can you please help me to optimise the dax query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query is below that;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR CA =&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'FACT_SALES',&lt;BR /&gt;'FACT_SALES'[CLIENT_ID],&lt;BR /&gt;"client_xx",&lt;BR /&gt;IF (&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'FACT_SALES'[MONTANTNET] ),&lt;BR /&gt;USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )&lt;BR /&gt;) &amp;gt; 0.00001,&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;))&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX ( CA, [client_xx] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward to your answers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 21:24:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3636772#M140705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-12T21:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Optimization help request</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3636847#M140712</link>
      <description>&lt;P&gt;Read this article&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/all-the-secrets-of-summarize/" target="_blank"&gt;All the secrets of SUMMARIZE - SQLBI&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 23:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3636847#M140712</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-01-12T23:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Optimization help request</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3637037#M140720</link>
      <description>&lt;P&gt;hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEFINE
VAR CA =
addcolumn(
all('FACT_SALES'[CLIENT_ID]),
"client_xx",
IF (
  CALCULATE (
     SUM ( 'FACT_SALES'[MONTANTNET] ),
     USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )
  ) &amp;gt; 0.00001,
1,
0
))
RETURN
SUMX ( CA, [client_xx] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jan 2024 06:35:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3637037#M140720</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-01-13T06:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Optimization help request</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3642991#M141049</link>
      <description>&lt;P&gt;It seems like you are trying to create a calculated column in DAX using the SUMX and SUMMARIZE functions. Without knowing the exact details of your data model and the specific optimization needs, I can provide some general suggestions to improve the performance of your DAX query.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Avoid using IF inside CALCULATE:&lt;/STRONG&gt; You are using an IF statement inside CALCULATE, which might lead to performance issues. Try to rewrite your DAX using FILTER or other relevant functions to avoid the nested IF.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR CA =&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'FACT_SALES',&lt;BR /&gt;'FACT_SALES'[CLIENT_ID],&lt;BR /&gt;"client_xx",&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'FACT_SALES'[MONTANTNET] ),&lt;BR /&gt;USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )&lt;BR /&gt;) &amp;gt; 0.00001&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX ( CA, [client_xx] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avoid using SUMMARIZE inside SUMX:&lt;/STRONG&gt;&lt;SPAN&gt; The use of SUMMARIZE inside SUMX might not be necessary. Instead, try to use the underlying table directly in SUMX.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DEFINE&lt;BR /&gt;VAR CA =&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;VALUES('FACT_SALES'[CLIENT_ID]),&lt;BR /&gt;'FACT_SALES'[MONTANTNET] &amp;gt; 0.00001,&lt;BR /&gt;USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX ( CA, [client_xx] )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check relationships and indexes:&lt;/STRONG&gt; Ensure that your relationships are correctly set up in the data model. Also, check if there are indexes on the relevant columns for better query performance.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use simpler expressions if possible:&lt;/STRONG&gt; If your measure is still slow, consider simplifying the logic or breaking down the calculation into smaller steps to identify the bottleneck.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Remember that DAX performance optimization often depends on the specific characteristics of your data and data model, so it's essential to test different approaches and monitor the performance impact.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:23:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3642991#M141049</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-17T08:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Optimization help request</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3642992#M141050</link>
      <description>&lt;P&gt;It seems like you are trying to create a calculated column in DAX using the SUMX and SUMMARIZE functions. Without knowing the exact details of your data model and the specific optimization needs, I can provide some general suggestions to improve the performance of your DAX query.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Avoid using IF inside CALCULATE:&lt;/STRONG&gt; You are using an IF statement inside CALCULATE, which might lead to performance issues. Try to rewrite your DAX using FILTER or other relevant functions to avoid the nested IF.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;DEFINE&lt;BR /&gt;VAR CA =&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'FACT_SALES',&lt;BR /&gt;'FACT_SALES'[CLIENT_ID],&lt;BR /&gt;"client_xx",&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'FACT_SALES'[MONTANTNET] ),&lt;BR /&gt;USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )&lt;BR /&gt;) &amp;gt; 0.00001&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX ( CA, [client_xx] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avoid using SUMMARIZE inside SUMX:&lt;/STRONG&gt;&lt;SPAN&gt; The use of SUMMARIZE inside SUMX might not be necessary. Instead, try to use the underlying table directly in SUMX.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DEFINE&lt;BR /&gt;VAR CA =&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;VALUES('FACT_SALES'[CLIENT_ID]),&lt;BR /&gt;'FACT_SALES'[MONTANTNET] &amp;gt; 0.00001,&lt;BR /&gt;USERELATIONSHIP ( 'DIM Representant'[REPRESENTANT_ID], 'FACT_SALES'[REPRESENTANT_ID] )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX ( CA, [client_xx] )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Check relationships and indexes:&lt;/STRONG&gt; Ensure that your relationships are correctly set up in the data model. Also, check if there are indexes on the relevant columns for better query performance.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use simpler expressions if possible:&lt;/STRONG&gt; If your measure is still slow, consider simplifying the logic or breaking down the calculation into smaller steps to identify the bottleneck.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Remember that DAX performance optimization often depends on the specific characteristics of your data and data model, so it's essential to test different approaches and monitor the performance impact.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 08:23:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Optimization-help-request/m-p/3642992#M141050</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-01-17T08:23:33Z</dc:date>
    </item>
  </channel>
</rss>

