<?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: Need help with optimization of calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730662#M1753</link>
    <description>&lt;P&gt;If in trouble, please find the relevant forum on PowerQuery and post your question. You can also try people like Chris Webb, Marco Russo, Matt Arlington...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 09:22:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-07-03T09:22:56Z</dc:date>
    <item>
      <title>Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730509#M1739</link>
      <description>&lt;P&gt;In my model I have a calculated column used to find the creation date of an entry number on the table 'G/L Entry'. The date is located on the table 'G/L Register'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My formula is a follows:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;Creation Date&lt;/STRONG&gt; = CALCULATE( &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUES('G/L Register'[Creation Date]); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER('G/L Register'; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'G/L Entry'[Entry No] &amp;gt;= 'G/L Register'[From Entry No_] &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'G/L Entry'[Entry No] &amp;lt;= 'G/L Register'[To Entry No_]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;However, this formula is incredibly heavy on memory and performance and takes forever to evaluate.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;Does anybody know how to improve this?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Jul 2019 07:51:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730509#M1739</guid>
      <dc:creator>SanchezDK</dc:creator>
      <dc:date>2019-07-03T07:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730559#M1741</link>
      <description>&lt;P&gt;What about this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Creation Date] = -- column in 'G/L Entry'
var _entryNumber = 'G/L Entry'[Entry No]
return
	CALCULATE(
		MAX( 'G/L Register[Creation Date] ),
		'G/L Register'[From Entry No_] &amp;lt;= __entryNumber,
		__entryNumber &amp;lt;= 'G/L Register'[To Entry No_]
	)&lt;/PRE&gt;&lt;P&gt;First, I understand that the intervals [[From Entry No_], [To Entry No_]] are ranges that cover the whole range and are non-overlapping. Second, I understand there's no relationship set up between the two tables. But if there is, for instance, 'G/L Entry' has a many-to-one relationship with 'G/L Register' (as I think it should have since one entry can easily map into just one record in 'G/L Register' that the entry number belongs to), then the measure would be different and potentially much, much faster:&lt;/P&gt;&lt;PRE&gt;[Creation Date] = CALCULATE( MAX( 'G/L Register[Creation Date] ) )&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:17:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730559#M1741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-03T08:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730597#M1745</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried your first suggestion, however this takes up all memory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right about your assumptions. There is no relationship between&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'G/L Entry' and 'G/L Register'. Perhaps I could create a key to map the Entry No from G/L Entry to the range number that it belongs to in G/L Register?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:45:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730597#M1745</guid>
      <dc:creator>SanchezDK</dc:creator>
      <dc:date>2019-07-03T08:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730599#M1746</link>
      <description>&lt;P&gt;Yes, you absolutely should if you can. Calculations based on physical relationships are 10-100x faster than without them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you also could create the column in your ETL layer, which would be the best solution possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;BR /&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:49:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730599#M1746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-03T08:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730606#M1747</link>
      <description>&lt;P&gt;By the way, if you create the relationship, then you can use this (the fastest option with DAX):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Creation Date] = RELATED( 'G/L Register[Creation Date] )&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:52:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730606#M1747</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-03T08:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730611#M1749</link>
      <description>&lt;P&gt;Sounds great. However right now I am struggling with the creation of a key to map the entry no with the number on G/L Register that represents the relevant range.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:54:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730611#M1749</guid>
      <dc:creator>SanchezDK</dc:creator>
      <dc:date>2019-07-03T08:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730619#M1750</link>
      <description>&lt;P&gt;You should do it in PowerQuery and I assume this is what you do. Certainly, there are myriads of articles on the net about how to do this as it must be a very common thing to do in PQ. Just a matter of a good search...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;BR /&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 08:56:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730619#M1750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-03T08:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730659#M1752</link>
      <description>&lt;P&gt;No luck so far... :-)&amp;nbsp;&lt;/P&gt;&lt;P&gt;But thanks for your inputs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 09:20:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730659#M1752</guid>
      <dc:creator>SanchezDK</dc:creator>
      <dc:date>2019-07-03T09:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with optimization of calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730662#M1753</link>
      <description>&lt;P&gt;If in trouble, please find the relevant forum on PowerQuery and post your question. You can also try people like Chris Webb, Marco Russo, Matt Arlington...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 09:22:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-optimization-of-calculated-column/m-p/730662#M1753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-03T09:22:56Z</dc:date>
    </item>
  </channel>
</rss>

