<?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 Query, ALL function performance issue. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403126#M62976</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="102761" data-lia-user-login="joepath" class="lia-mention lia-mention-user"&gt;joepath&lt;/a&gt;&amp;nbsp;- what is the "FactROI[OrderType]" that is included in your query?&amp;nbsp; Is this necessary.&amp;nbsp; I would need a model and dax studio to try by I would explore using REMOVEFILTERS instead of using the separate ALL references&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 11:31:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-18T11:31:16Z</dc:date>
    <item>
      <title>DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2402954#M62970</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there any way to rewrite the below qeury in optimize way, its taking lot of time to return the result in tabular report.&lt;/P&gt;&lt;P&gt;Calculating total order for each product, across time,country and employee.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total Order Measure = CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COUNT(Fact[dimOrderID]),OR(Fact[OrderType]="aaa",Fact[OrderType]="bbb")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,ALL(dimDate[dimDateID])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;,ALL(dimCountry),ALL(dimEmployee)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;Table would be like below. and Totalorder will be change by report filter.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Filter: country&amp;nbsp; &amp;nbsp;Filter: Date, Filter: Employee&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Product&amp;nbsp; &amp;nbsp; &amp;nbsp; TotalOrder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 13:38:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2402954#M62970</guid>
      <dc:creator>joepath</dc:creator>
      <dc:date>2022-03-18T13:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403064#M62974</link>
      <description>&lt;P&gt;The problem is you are removing the existing filters from Date, Employee and Country because of which CALCULATE never returns blank for combinations where there is no row in the Fact table and your code triggers the CROSSAPPLY (CROSSFJOIN) behaviour of DAX Engines which returns all the possible combinations of the columns in the visual/matrix, since available information here is limited you can use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Order Measure =
IF (
    NOT ISEMPTY ( Sales ),
    CALCULATE (
        COUNTROWS ( VALUES ( Sales[ProductKey] ) ),
        OR ( Fact[OrderType] = "aaa", FactROI[OrderType] = "bbb" ),
        ALL ( dimDate[dimDateID] ),
        ALL ( dimCountry ),
        ALL ( dimEmployee )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:06:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403064#M62974</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2022-03-18T11:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403126#M62976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="102761" data-lia-user-login="joepath" class="lia-mention lia-mention-user"&gt;joepath&lt;/a&gt;&amp;nbsp;- what is the "FactROI[OrderType]" that is included in your query?&amp;nbsp; Is this necessary.&amp;nbsp; I would need a model and dax studio to try by I would explore using REMOVEFILTERS instead of using the separate ALL references&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:31:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403126#M62976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-18T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403180#M62979</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/236628" target="_self"&gt;&lt;SPAN class=""&gt;AntrikshSharma&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;that was quick reply, Tested the your suggestion working well.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you also look at the below post if you have some suggestion.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dax-Query-optimization/m-p/2281488" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dax-Query-optimization/m-p/2281488&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:51:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403180#M62979</guid>
      <dc:creator>joepath</dc:creator>
      <dc:date>2022-03-18T11:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403192#M62980</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;Daryl-Lynch-Bzy looking into this, tried&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/236628" target="_self"&gt;&lt;SPAN class=""&gt;AntrikshSharma&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;solution and its working fine now.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 11:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2403192#M62980</guid>
      <dc:creator>joepath</dc:creator>
      <dc:date>2022-03-18T11:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2461960#M66685</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;After applying the&amp;nbsp;&amp;nbsp;NOT ISEMPTY ( Sales ) a bug is coming.below 19301, 19302 are the dimension column values, and other 2 columns are measure, and in the 3rd column where I applied the above dax.Before appying the&amp;nbsp;IF( NOT( ISEMPTY(FactROI)) below is the result which is working fine, even 19302 dimension doest have value in the first column but 3rd one still showing the result.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now after applying the&amp;nbsp;IF( NOT( ISEMPTY(FactROI)) 2nd row gone.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How to fix it without impacting the result? if I remove if condition then performance is very slow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 16:56:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/2461960#M66685</guid>
      <dc:creator>joepath</dc:creator>
      <dc:date>2022-04-18T16:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Query, ALL function performance issue.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/3967867#M153885</link>
      <description>&lt;P&gt;Thanks it solved my problem&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 07:36:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Query-ALL-function-performance-issue/m-p/3967867#M153885</guid>
      <dc:creator>sidhaengineer</dc:creator>
      <dc:date>2024-06-03T07:36:21Z</dc:date>
    </item>
  </channel>
</rss>

