<?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: Measure extremely slow in matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785958#M87321</link>
    <description>&lt;P&gt;Hey, thanks for respond.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second solution works, now performance analyzer shows 800ms :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First solution doesn't, it says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2022 06:52:06 GMT</pubDate>
    <dc:creator>krisstok</dc:creator>
    <dc:date>2022-09-22T06:52:06Z</dc:date>
    <item>
      <title>Measure extremely slow in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785259#M87272</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help optimization in dax measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm counting customers who had turnover greater than 10. The sales table has customers, document numbers, products, so I to group the turnover by customer and then filter the total above 10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Customers Qty Turnover &amp;gt; 10 =&lt;BR /&gt;VAR _group =&lt;BR /&gt;ADDCOLUMNS (&lt;BR /&gt;VALUES ( Sales[CustomerNameGrouped] ),&lt;BR /&gt;"Turnover", [Turnover]&lt;BR /&gt;)&lt;BR /&gt;VAR _filter =&lt;BR /&gt;FILTER ( _group, [Turnover] &amp;gt; 10 )&lt;BR /&gt;VAR _result =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DISTINCTCOUNT(Sales[CustomerNameGrouped]),&lt;BR /&gt;_filter&lt;BR /&gt;)&lt;BR /&gt;RETURN _result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I put this in matrix (customers in rows, months in columns), table is very slow. Performance analyzer shows me after scrolling that dax measure took more than 6 seconds. So I don't know how to perform it better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sales table has about 150k rows.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 22:23:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785259#M87272</guid>
      <dc:creator>krisstok</dc:creator>
      <dc:date>2022-09-21T22:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Measure extremely slow in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785384#M87277</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="391135" data-lia-user-login="krisstok" class="lia-mention lia-mention-user"&gt;krisstok&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Customers Qty Turnover &amp;gt; 10 =
VAR __Table = CALCULATETABLE('Sales',KEEPFILTERS(DISTINCT('Sales'[CustomerNameGrouped)),[Turnover] &amp;gt; 10)
RETURN
COUNTROWS(DISTINCT(SELECTCOLUMNS(__Table,"__Group",[CustomerNameGrouped)))

or maybe:
Customers Qty Turnover &amp;gt; 10 =
VAR __Table = FILTER(SUMMARIZE('Sales',[CustomerNameGrouped],"__Turnover",[Turnover]),[__Turnover] &amp;gt; 10)
RETURN
COUNTROWS(DISTINCT(SELECTCOLUMNS(__Table,"__Group",[CustomerNameGrouped)))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Sep 2022 00:47:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785384#M87277</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-22T00:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Measure extremely slow in matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785958#M87321</link>
      <description>&lt;P&gt;Hey, thanks for respond.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second solution works, now performance analyzer shows 800ms :).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First solution doesn't, it says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 06:52:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-extremely-slow-in-matrix/m-p/2785958#M87321</guid>
      <dc:creator>krisstok</dc:creator>
      <dc:date>2022-09-22T06:52:06Z</dc:date>
    </item>
  </channel>
</rss>

