<?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: RANKX fails with more rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3896277#M151846</link>
    <description>&lt;P&gt;Move the measure outside the RANKX so that it will be computed only once.&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2024 18:50:49 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-05-06T18:50:49Z</dc:date>
    <item>
      <title>RANKX fails with more rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3894909#M151794</link>
      <description>&lt;P&gt;Hi guys! I have simple RANKX DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;1. Amount RANKX =
RANKX(
    ALLSELECTED('DIM_CUSTOMER'[Name]),
     '1. X_Measures[Amount],,
     DESC,
     Dense)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;It all works,&amp;nbsp; I put Customer Name as Row, this measure together with Amount in values, there is a ranking visible, all works nicely.&lt;BR /&gt;But as soon as I add another row from different table under the Customer Name (for example Contract Number), it immediatly fails saying that it exceeded all available resources.&lt;BR /&gt;&lt;BR /&gt;I assume that this calculation tries to rank further on the next row too? Can I somehow change this measure to behave correctly?&lt;BR /&gt;When I do it the default way (Using the built in filters, putting customer name then selecting TopN option and Amount as data), it works perfectly no matter how many drilldown are there. But the TopN is fixed there, thus my workaround.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 May 2024 10:52:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3894909#M151794</guid>
      <dc:creator>lemaribdb</dc:creator>
      <dc:date>2024-05-06T10:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX fails with more rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3896277#M151846</link>
      <description>&lt;P&gt;Move the measure outside the RANKX so that it will be computed only once.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 18:50:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3896277#M151846</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T18:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX fails with more rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897782#M151890</link>
      <description>&lt;P&gt;Here are a few approaches you can try to address this issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Optimize the DAX expression&lt;/STRONG&gt;: Ensure that your DAX expression is as optimized as possible. Sometimes, small changes in the DAX expression can significantly improve performance. For example, you could check if there are any unnecessary filters or columns being included in the calculation.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use context transition&lt;/STRONG&gt;: You can try using context transition functions like CALCULATE or FILTER to evaluate the RANKX expression within a smaller context, which might improve performance. For example, you could try something like:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;DAX&lt;/SPAN&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;Amount RANKX = RANKX( FILTER(ALLSELECTED('DIM_CUSTOMER'[Name]), HASONEVALUE('DIM_CUSTOMER'[Name])), '1. X_Measures[Amount], DESC, Dense )&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This limits the calculation of RANKX to only the rows where 'DIM_CUSTOMER'[Name] has a single value.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 07 May 2024 07:40:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897782#M151890</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-05-07T07:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX fails with more rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897860#M151892</link>
      <description>&lt;P&gt;This measure is already computed outside.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 08:08:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897860#M151892</guid>
      <dc:creator>lemaribdb</dc:creator>
      <dc:date>2024-05-07T08:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: RANKX fails with more rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897926#M151900</link>
      <description>&lt;P&gt;I've tried using IF(ISINSCOPE()) but seems it only works for rows "on top" of the one we do ranking on, the ones below still get some ranks, thus I imagine the resource issue. Still looking for solution.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 08:27:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RANKX-fails-with-more-rows/m-p/3897926#M151900</guid>
      <dc:creator>lemaribdb</dc:creator>
      <dc:date>2024-05-07T08:27:54Z</dc:date>
    </item>
  </channel>
</rss>

