<?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 Ranking Ties in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3047722#M104834</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Syntax error. You need to have thee commas before "Dense" not only one. However, this won't help to break the ties. There must be other columns that can be used to break the tie but simplist method is to create an index column using power query then your ranking formula would be&lt;/P&gt;
&lt;P&gt;Rtotal =&lt;BR /&gt;RANKX (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;PO_PurchaseOrderDetail,&lt;BR /&gt;ALLEXCEPT ( PO_PurchaseOrderDetail, PO_PurchaseOrderDetail[ItemCode] )&lt;BR /&gt;),&lt;BR /&gt;PO_PurchaseOrderDetail[Index],&lt;BR /&gt;,&lt;BR /&gt;asc,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 17:07:17 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-01-27T17:07:17Z</dc:date>
    <item>
      <title>RankX Ranking Ties</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3047681#M104826</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Can someone help with how to break ties? I have the below dax forumla creating a ranking column in my table using item code that thens ranks by the earliest date. I tried adding dense to the ties portion of the formula and I get this error&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ranking = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __cd = PO_PurchaseOrderDetail[ItemCode]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;( PO_PurchaseOrderDetail, &amp;nbsp;PO_PurchaseOrderDetail[ItemCode] = __cd ),PO_PurchaseOrderDetail[PODATE])&lt;BR /&gt;&lt;BR /&gt;Ranking error using Dense:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Rtotal = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __po = PO_PurchaseOrderDetail[PurchaseOrderNo]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; __cd = PO_PurchaseOrderDetail[ItemCode]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RANKX&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;( PO_PurchaseOrderDetail, &amp;nbsp;PO_PurchaseOrderDetail[ItemCode] = __cd ),PO_PurchaseOrderDetail[PODATE], DENSE)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Results:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Expected Ressult:&lt;BR /&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Thanks so much in advance!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Jan 2023 16:51:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3047681#M104826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-27T16:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Ranking Ties</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3047722#M104834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Syntax error. You need to have thee commas before "Dense" not only one. However, this won't help to break the ties. There must be other columns that can be used to break the tie but simplist method is to create an index column using power query then your ranking formula would be&lt;/P&gt;
&lt;P&gt;Rtotal =&lt;BR /&gt;RANKX (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;PO_PurchaseOrderDetail,&lt;BR /&gt;ALLEXCEPT ( PO_PurchaseOrderDetail, PO_PurchaseOrderDetail[ItemCode] )&lt;BR /&gt;),&lt;BR /&gt;PO_PurchaseOrderDetail[Index],&lt;BR /&gt;,&lt;BR /&gt;asc,&lt;BR /&gt;DENSE&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:07:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3047722#M104834</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-27T17:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: RankX Ranking Ties</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3055471#M105386</link>
      <description>&lt;P&gt;Thank you! This worked perfectly, I guess I just wasnt considering how the order entry table would already be in order by date since when a new one is entered its always the most recent entry.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 14:45:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/RankX-Ranking-Ties/m-p/3055471#M105386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-01T14:45:11Z</dc:date>
    </item>
  </channel>
</rss>

