<?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: Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811413#M38262</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185610" data-lia-user-login="analytics_uk" class="lia-mention lia-mention-user"&gt;analytics_uk&lt;/a&gt; , what is the source data? How many rows &lt;/P&gt;
&lt;P&gt;I am assuming you are getting this on power bi service, not desktop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Desktop, check&lt;/P&gt;
&lt;P&gt;&lt;A href="https://windowsreport.com/memory-error-allocation-failure/" target="_blank"&gt;https://windowsreport.com/memory-error-allocation-failure/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 12:03:06 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-04-28T12:03:06Z</dc:date>
    <item>
      <title>Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811358#M38258</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the above message when refreshing on Power BI Online.&lt;/P&gt;&lt;P&gt;I have isolated the problem and know that it is literally related to the one calculated column below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_Next Order Date = CALCULATE(MIN(Order_Header[Date]),FILTER(Order_Header,Order_Header[Date] &amp;gt; EARLIER ( Order_Header[Date] )
                &amp;amp;&amp;amp; Order_Header[Customer_Email] = EARLIER ( Order_Header[Customer_Email] )))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need this for a host of different measures. It just gives the next order date for a particular customer.&lt;/P&gt;&lt;P&gt;Is there a way to change the setting on power bi online to accomodate this before I look at ways of changing the DAX?&lt;/P&gt;&lt;P&gt;Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 11:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811358#M38258</guid>
      <dc:creator>analytics_uk</dc:creator>
      <dc:date>2021-04-28T11:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811413#M38262</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185610" data-lia-user-login="analytics_uk" class="lia-mention lia-mention-user"&gt;analytics_uk&lt;/a&gt; , what is the source data? How many rows &lt;/P&gt;
&lt;P&gt;I am assuming you are getting this on power bi service, not desktop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Desktop, check&lt;/P&gt;
&lt;P&gt;&lt;A href="https://windowsreport.com/memory-error-allocation-failure/" target="_blank"&gt;https://windowsreport.com/memory-error-allocation-failure/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 12:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811413#M38262</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-04-28T12:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811428#M38264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are some 200k rows on the table where that calculated column lies.&lt;/P&gt;&lt;P&gt;It comes from a SQL query that i wrote, if that's what you mean by source data?&lt;/P&gt;&lt;P&gt;And yes, I get the error on power bi service and not desktop&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 12:09:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811428#M38264</guid>
      <dc:creator>analytics_uk</dc:creator>
      <dc:date>2021-04-28T12:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811488#M38269</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185610" data-lia-user-login="analytics_uk" class="lia-mention lia-mention-user"&gt;analytics_uk&lt;/a&gt; , Please also log an issue - &lt;A href="https://community.powerbi.com/t5/Issues/idb-p/Issues" target="_blank"&gt;https://community.powerbi.com/t5/Issues/idb-p/Issues&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;this does seem like a big number.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 12:44:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1811488#M38269</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-04-28T12:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1812435#M38307</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="185610" data-lia-user-login="analytics_uk" class="lia-mention lia-mention-user"&gt;analytics_uk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First off, one should refrain from calculating columns via DAX (too many reasons to state). It should be done in the source or in Power Query, where such calculations truly belong and where they'll be fast. Second, one should never use CALCULATE in calculated columns on big fact tables. CALCULATE executes context transition and this is always very costly. If you pair it with the number of rows that this needs to be calculated for in a fact table... well, you get the gist. It'll almost always throw a memory-overflow error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a version that does not use CALCULATE, so there's a chance it'll work. But, as I said, you should ideally calculate this outside DAX for speed and memory efficiency reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[_Next Order Date] =
var CurrentDate = Order_Header[Date]
var CurrentEmail = Order_Header[Customer_Email]
var Result =
MINX(
    FILTER(
        Order_Header,
        Order_Header[Date] &amp;gt; CurrentDate
        &amp;amp;&amp;amp;
        Order_Header[Customer_Email] = CurrentEmail
    ),
    Order_Header[Date]
)
return
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Apr 2021 21:29:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Memory-error-Memory-Allocation-failure-Try-simplifying-or/m-p/1812435#M38307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-04-28T21:29:49Z</dc:date>
    </item>
  </channel>
</rss>

