<?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: Using RANKX to order by date and more criterias in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2839583#M90691</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;Rank CC =
VAR _newtable =
    FILTER ( Data, Data[Task] = "PUBLISH" )
VAR _rankcolumn =
    SUMMARIZE (
        ADDCOLUMNS (
            _newtable,
            "@rank", COUNTROWS ( FILTER ( _newtable, Data[Date] &amp;lt;= EARLIER ( Data[Date] ) ) )
        ),
        Data[Name],
        [@rank]
    )
RETURN
    MAXX ( FILTER ( _rankcolumn, Data[Name] = EARLIER ( Data[Name] ) ), [@rank] )
&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 13 Oct 2022 11:51:02 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-10-13T11:51:02Z</dc:date>
    <item>
      <title>Using RANKX to order by date and more criterias</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2839287#M90680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to order one table by date using RankX() but taking into account that when the value is the same on column "Name" the output should be the same and that I only want to order when value at column "Task" is "PUBLISH". It's a bit difficult to explain so I show it with a table and the desired output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2839287#M90680</guid>
      <dc:creator>hasier</dc:creator>
      <dc:date>2022-10-13T09:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using RANKX to order by date and more criterias</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2839583#M90691</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;Rank CC =
VAR _newtable =
    FILTER ( Data, Data[Task] = "PUBLISH" )
VAR _rankcolumn =
    SUMMARIZE (
        ADDCOLUMNS (
            _newtable,
            "@rank", COUNTROWS ( FILTER ( _newtable, Data[Date] &amp;lt;= EARLIER ( Data[Date] ) ) )
        ),
        Data[Name],
        [@rank]
    )
RETURN
    MAXX ( FILTER ( _rankcolumn, Data[Name] = EARLIER ( Data[Name] ) ), [@rank] )
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Oct 2022 11:51:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2839583#M90691</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-13T11:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using RANKX to order by date and more criterias</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2841067#M90790</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For fun only, a showcase of powerful Excel worksheet formula,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 02:34:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2841067#M90790</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-10-14T02:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using RANKX to order by date and more criterias</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2842281#M90830</link>
      <description>&lt;P&gt;Thank you very much! It works perfectly fine &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 10:53:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-RANKX-to-order-by-date-and-more-criterias/m-p/2842281#M90830</guid>
      <dc:creator>hasier</dc:creator>
      <dc:date>2022-10-14T10:53:56Z</dc:date>
    </item>
  </channel>
</rss>

