<?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: Error : The query processor ran out of internal resources and could not produce a query plan in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948702#M10504</link>
    <description>It might be that you're getting the error because there are TOO MANY CONTEXT TRANSITIONS. Then you don't have a choice - you have to rewrite the formula to only use FILTER without any CALCULATE or RELATEDTABLE (which does context transition as well).&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
    <pubDate>Wed, 26 Feb 2020 11:16:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-26T11:16:28Z</dc:date>
    <item>
      <title>Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948424#M10486</link>
      <description>&lt;P&gt;I receive the following error message :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.. The exception was raised by the IDbCommand interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My query is the following :&amp;nbsp;&lt;/P&gt;&lt;P&gt;L&lt;SPAN&gt;astClosed = CALCULATE(MAX('OptiQ Query'[ClosedUTC]),RELATEDTABLE('OptiQ Query'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So i am trying to get the MAX date field from a related table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;both tables contain +10.000 rows. The formula worked in the past, but I assume that it fails since it passed a certain number of rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I can make this work again?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 08:27:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948424#M10486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T08:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948549#M10489</link>
      <description>Mate, do you know what you are writing at all? I think you should do some serious reading about DAX. The fact that something "works" (for some time and for some scenarios) does not mean it's correct.&lt;BR /&gt;&lt;BR /&gt;By the way, here's the documentation on RELATEDTABLE. It should only be used when there is context transition and some row context is active. This is not the case in your measure.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dax.guide/relatedtable/" target="_blank"&gt;https://dax.guide/relatedtable/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You say "I'm trying to get the max date from a related table." Well, related to WHAT?&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 26 Feb 2020 09:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948549#M10489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T09:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948561#M10490</link>
      <description>&lt;P&gt;Let me explain the situation in more detail.&lt;/P&gt;&lt;P&gt;Table ServiceOrder has a one to many relationship with workorderincident, workorderincident has a one to many relationship with tabel Query. (this relationship is actually 1 to 1, but due to null values, in the workorderincident table, this is impossible to select)&lt;/P&gt;&lt;P&gt;Table Query contains the send date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the latest send date for each Service Order.&lt;/P&gt;&lt;P&gt;Therefor I used the&amp;nbsp;&lt;SPAN&gt;CALCULATE(MAX('OptiQ Query'[SentUTC]),RELATEDTABLE('OptiQ Query')) Formula&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I understand that because it worked in the past that is was correct. However this a forum to request help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So I am requesting help to find the correct way to set this up.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks for your friendly response.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Feb 2020 09:50:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948561#M10490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T09:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948576#M10491</link>
      <description>Help is one thing, at least minimal understanding of what you do is yet another. It always pays off to know what you do and why. Especially with DAX.&lt;BR /&gt;&lt;BR /&gt;For your own good you should read about DAX since your "measure" shows without fail you don't get it at all. You might not like what you read, it's OK, I don't blame you. The important bit is that you start reading on DAX. Then my job is done.&lt;BR /&gt;&lt;BR /&gt;As for help... All you most likely need is this:&lt;BR /&gt;&lt;BR /&gt;[Latest Send Date] = MAX('OptiQ Query'[SentUTC])&lt;BR /&gt;&lt;BR /&gt;Yes, it's that simple.&lt;BR /&gt;&lt;BR /&gt;If your tables are set up correctly, then this is THE measure. If not, then... please try to start get familiar with what it means "correct model."&lt;BR /&gt;&lt;BR /&gt;And don't forget to check out the docs on RELATEDTABLE.&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;D</description>
      <pubDate>Wed, 26 Feb 2020 10:02:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948576#M10491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T10:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948683#M10499</link>
      <description>&lt;P&gt;I understand what related table is and what it does.&lt;/P&gt;&lt;P&gt;And no it's not that simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use a normal MAX, like you sugested, I get the max date in the workorderincident table. I need the max date of the related records not of the whole table. It seems the MAX is not checking for related records (although there is a 1 to many-1 service order multuple workorderincidents, relationship between both tables).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefor my question is :&lt;/P&gt;&lt;P&gt;- what are the limitations of related table?&lt;/P&gt;&lt;P&gt;- is their a more sutable solution for getting this data?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 11:04:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948683#M10499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T11:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948693#M10501</link>
      <description>You're not talking about a measure then but about a calculated column, right? In the post you did not say that &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; There's a huge difference between a measure and a calculated column.&lt;BR /&gt;&lt;BR /&gt;For a calc column it's this:&lt;BR /&gt;&lt;BR /&gt;[Latest Date] = // calculated column&lt;BR /&gt;maxx(&lt;BR /&gt;    relatedtable( 'OptiQ Query'),&lt;BR /&gt;    'OptiQ Query'[SentUTC]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Next time, please be as specific as possible about what you want.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 26 Feb 2020 11:10:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948693#M10501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T11:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948699#M10503</link>
      <description>If you don't want to have context transitions (which are very expensive if your table in which the column is is huge), then you'll need to do something different, more complex. But to write code without context transition I have to know the model you have.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Feb 2020 11:14:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948699#M10503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T11:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948702#M10504</link>
      <description>It might be that you're getting the error because there are TOO MANY CONTEXT TRANSITIONS. Then you don't have a choice - you have to rewrite the formula to only use FILTER without any CALCULATE or RELATEDTABLE (which does context transition as well).&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 26 Feb 2020 11:16:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948702#M10504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T11:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948770#M10513</link>
      <description>&lt;P&gt;Hi Darlove,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the answers.&lt;/P&gt;&lt;P&gt;I will look in to all possible improvements (calculated columns,context transitions, filter,...)&lt;/P&gt;&lt;P&gt;I'll let you know how I solved it, or if I need extra info later this week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 11:57:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948770#M10513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T11:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948777#M10515</link>
      <description>OK. Please do.&lt;BR /&gt;&lt;BR /&gt;But first try this simple formula:&lt;BR /&gt;&lt;BR /&gt;[Latest Date] = // calculated column&lt;BR /&gt;maxx(&lt;BR /&gt;    relatedtable( 'OptiQ Query'),&lt;BR /&gt;    'OptiQ Query'[SentUTC]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Wed, 26 Feb 2020 12:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/948777#M10515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T12:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error : The query processor ran out of internal resources and could not produce a query plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/952840#M10777</link>
      <description>&lt;P&gt;Quick update :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now, i have found a solution.&lt;/P&gt;&lt;P&gt;i was using related table for a table that had no direct link with my main table, there was a table in between those 2.&lt;/P&gt;&lt;P&gt;The temporary solution was creation a new field on the middle table which used related table to the 3th table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then updating the column on the first table to link to the second one instead of useing relatedtable to the 3th.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that woks, for now, but my next step is to still read up upon all possible solutions because i feel that a more permanent/better solution is possible/needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 12:22:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-The-query-processor-ran-out-of-internal-resources-and/m-p/952840#M10777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-28T12:22:03Z</dc:date>
    </item>
  </channel>
</rss>

