<?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 Out of memory error in a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474739#M28056</link>
    <description>&lt;P&gt;There's nothing wrong about averaging a measure. The problem you most likoly have is that you want to average it over a large set of rows and since a measure always performs context trastition (and this is an expensive operation) you'll almost surely get an error and in addition the calculation will be slow. Often agonizingly slow. On top of that, your measure is composed of more measures that might be doing something slow or might require a lot of materialization (because the measures are not optimized, for instance).&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 15:33:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-04T15:33:14Z</dc:date>
    <item>
      <title>DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472435#M27976</link>
      <description>&lt;P&gt;Greetings, I am getting a Out of memory error in a measure. I have over 16 GB of ram. The measure is below&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average Manage Score = aVERAGEX( aLL(Education_Metrics),&amp;nbsp; [Tiered Manage Education Score])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Tiered Manage Education Score = ([Tiered Manage Courses Weight] +[Manage Certification Weightage]&amp;nbsp; +[Manage Life Cycle Weightage 2] )/[Manage Seats Weightage 3]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any tips what could cause this issue to go away?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Nov 2020 18:27:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472435#M27976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-03T18:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472442#M27977</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; What are the total number of rows of&amp;nbsp;&lt;SPAN&gt;Education_Metrics? You have 4 measures in a row context, depending on what they calculate the calculation could be pretty intense. The issue here should be that your dimension/fact table is huge and context transition is taking up too much time.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 18:32:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472442#M27977</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-11-03T18:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472454#M27980</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;&lt;FONT&gt;there are about&amp;nbsp; 120,000 rows in that table.&lt;BR /&gt;the measure without averagex is okay. Afer adding averagex it gives the error. Is there an alternate to average for a measure ?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 18:38:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472454#M27980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-03T18:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472465#M27981</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; Okay, so the problem is when you call a measure in the row context, context transition happens which means every row of the table is converted into a an equivalent filter context under which the measure used in the row context will be evaluated, and here it is being done 120K times, that's what is causing the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to include only those columns in ALL which you are using/slicing by in the report and then share your findings.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 18:44:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1472465#M27981</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-11-03T18:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474683#M28049</link>
      <description>&lt;P&gt;Golden rule of DAX: &lt;STRONG&gt;You should never call a measure in a row context on a big fact table&lt;/STRONG&gt;. This will almost always result in an out-of-mem error. Maybe you should think about structuring your model in a better way to change the DAX. Averaging measures over small dimensions or small tables is OK but not over big tables.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 14:59:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474683#M28049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-04T14:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474695#M28052</link>
      <description>&lt;P&gt;Thanks for reverting, So may i ask what is an alternative for averaging a Measure. If its not at a row level it may be alright. But to my newly gained knowledge about DAX, i was able to find only Averagex that could average a measure, there is no other way of averaging a measure that i was able to find.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 15:03:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474695#M28052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-04T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474739#M28056</link>
      <description>&lt;P&gt;There's nothing wrong about averaging a measure. The problem you most likoly have is that you want to average it over a large set of rows and since a measure always performs context trastition (and this is an expensive operation) you'll almost surely get an error and in addition the calculation will be slow. Often agonizingly slow. On top of that, your measure is composed of more measures that might be doing something slow or might require a lot of materialization (because the measures are not optimized, for instance).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 15:33:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1474739#M28056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-04T15:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1477055#M28127</link>
      <description>&lt;P&gt;Okay Thank you, let me try to optimise it and see if that works.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 15:18:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1477055#M28127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-05T15:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1485808#M28421</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;In my view i have optimised all possible ways where possible and created calculated coluns at a couple of places. But the averagex( ) still gives an out of memory problem. It works when there is a filter on a single value but not for all (which is what i want and average of all). How else can i do an average on a measure without going through each row. As i am interested in averaging all the values of the measure and not each row of the measure. This seems to be a limitation in power bi?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 21:55:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1485808#M28421</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T21:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Out of memory error in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1487351#M28495</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fact tables are not there to run measures against them. Dimensions are created exactly for this reason. Fact tables hold figures that measure your process and then you build measures/aggregations on top of these figures. Slicing and dicing is performed only through dimensions. Fact tables, in fact, should always be hidden from view. You should never iterate them row by row invoking measures in the meantime. If you have to do something like this, it means your design is most likely flawed. Please stick to the star schema and you should be safe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, AVERAGEX can be also calculated differently since an arithmetical average is just a sum of values divided by the number of values. So, broadly speaking, average = sum / count.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 12:44:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Out-of-memory-error-in-a-measure/m-p/1487351#M28495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-11T12:44:44Z</dc:date>
    </item>
  </channel>
</rss>

