<?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 Strange RANKX sorting in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3248457#M119779</link>
    <description>&lt;P&gt;Simple setup with Table "Result" Column "Size" (decimal formatted), slicer ("Sample Name" from Table2 Parameter).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 to many relationship setup between Parameter and Result table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank Size = 
RANKX (ALL(Result), CALCULATE(SUM(Result[Size])),,ASC, Dense)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Result below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it the filter context that is impacting or what is happening?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 22 May 2023 19:24:56 GMT</pubDate>
    <dc:creator>Salle</dc:creator>
    <dc:date>2023-05-22T19:24:56Z</dc:date>
    <item>
      <title>Strange RANKX sorting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3248457#M119779</link>
      <description>&lt;P&gt;Simple setup with Table "Result" Column "Size" (decimal formatted), slicer ("Sample Name" from Table2 Parameter).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1 to many relationship setup between Parameter and Result table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rank Size = 
RANKX (ALL(Result), CALCULATE(SUM(Result[Size])),,ASC, Dense)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Result below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it the filter context that is impacting or what is happening?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 22 May 2023 19:24:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3248457#M119779</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-05-22T19:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Strange RANKX sorting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3250164#M119894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="511107" data-lia-user-login="Salle" class="lia-mention lia-mention-user"&gt;Salle&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you to try code as below to create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rank Size =
VAR _SIZE =
    CALCULATETABLE ( VALUES ( Result[Size] ), ALLSELECTED ( Result ) )
VAR _ADDRANK =
    ADDCOLUMNS ( _SIZE, "RANK", RANKX ( _SIZE, [Size],, ASC, DENSE ) )
RETURN
    SUMX ( FILTER ( _ADDRANK, [Size] = MAX ( Result[Size] ) ), [RANK] )
&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 05:40:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3250164#M119894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-24T05:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Strange RANKX sorting</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3274579#M121458</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;thanks for the reply, I have tested and it seems to be working as expected. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 11:59:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Strange-RANKX-sorting/m-p/3274579#M121458</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-06-08T11:59:24Z</dc:date>
    </item>
  </channel>
</rss>

