<?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 Performance problems with moving average (over a index) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2583256#M36749</link>
    <description>&lt;P&gt;Hello, I have a problem with the calculation time when determining a moving average( not via date values, but via an index). The table is loaded into Power BI.&lt;BR /&gt;The table has about 100,000 rows and about 80 columns.&lt;BR /&gt;I calculate a moving average (calculated column) using:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Moving Average = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR MyIndex = RRK_A[Index]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR Window_A = 299&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR myResult = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;SUMX(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;FILTER(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A[Index] &amp;gt; MyIndex-Window_A &amp;amp;&amp;amp; &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A[Index] &amp;lt;= MyIndex&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;),RRK_A[RRK_A_FLAG]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN FIXED(myResult,2) &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Further I use a MEASUR:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Moving1 = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR currentIndex = MAX('RRK A'[Index])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR Grenze = 10&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR movingAverage = CALCULATE(SUM('RRK A'[RRK_A_flag]), FILTER(ALLSELECTED('RRK A'), 'RRK A'[Index] &amp;gt; currentIndex - &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Grenze &amp;amp;&amp;amp; 'RRK A'[Index] &amp;lt;= currentIndex))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;return movingAverage&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anyone have an idea how I can improve the performance?&lt;BR /&gt;Thanks for help&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 13:08:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-16T13:08:41Z</dc:date>
    <item>
      <title>Performance problems with moving average (over a index)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2583256#M36749</link>
      <description>&lt;P&gt;Hello, I have a problem with the calculation time when determining a moving average( not via date values, but via an index). The table is loaded into Power BI.&lt;BR /&gt;The table has about 100,000 rows and about 80 columns.&lt;BR /&gt;I calculate a moving average (calculated column) using:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Moving Average = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR MyIndex = RRK_A[Index]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR Window_A = 299&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR myResult = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;SUMX(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;FILTER(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A,&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A[Index] &amp;gt; MyIndex-Window_A &amp;amp;&amp;amp; &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RRK_A[Index] &amp;lt;= MyIndex&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;),RRK_A[RRK_A_FLAG]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN FIXED(myResult,2) &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Further I use a MEASUR:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Moving1 = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR currentIndex = MAX('RRK A'[Index])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR Grenze = 10&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;VAR movingAverage = CALCULATE(SUM('RRK A'[RRK_A_flag]), FILTER(ALLSELECTED('RRK A'), 'RRK A'[Index] &amp;gt; currentIndex - &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Grenze &amp;amp;&amp;amp; 'RRK A'[Index] &amp;lt;= currentIndex))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;return movingAverage&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anyone have an idea how I can improve the performance?&lt;BR /&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:08:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2583256#M36749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T13:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems with moving average (over a index)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586544#M36792</link>
      <description>&lt;P&gt;Use DAX Studio to study the query plan generated by your measures.&amp;nbsp; Change your measures to reduce the number of records/iterations in the query plans.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2022 01:51:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586544#M36792</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-18T01:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems with moving average (over a index)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586869#M36795</link>
      <description>&lt;P&gt;Thank you for your advice lbendlin.&lt;BR /&gt;But unfortunately I don't know what you mean by that?&lt;BR /&gt;Can you perhaps give me a hint?&lt;/P&gt;&lt;P&gt;Thanks Friedbert&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2022 16:56:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586869#M36795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-18T16:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems with moving average (over a index)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586975#M36799</link>
      <description>&lt;P&gt;&lt;A href="https://daxstudio.org/" target="_blank"&gt;DAX Studio - The ultimate client tool for working with DAX queries&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=C5HBhlLUFsE" target="_blank"&gt;Analyzing a slow report query in DAX Studio - YouTube&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jun 2022 00:15:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Performance-problems-with-moving-average-over-a-index/m-p/2586975#M36799</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-19T00:15:15Z</dc:date>
    </item>
  </channel>
</rss>

