<?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 the rankx function  inside a date table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-the-rankx-function-inside-a-date-table/m-p/3263676#M120757</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please use&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Date =
VAR T =
    CALENDARAUTO ()
RETURN
    ADDCOLUMNS (
        T,
        "Year", YEAR ( [Date] ),
        "Quarter", "Q" &amp;amp; QUARTER ( [Date] ),
        "Month", FORMAT ( [Date], "mmmm" ),
        "Month Number", MONTH ( [Date] ),
        "Date Rank", RANKX ( T, FORMAT ( [Date], "YYYYMM" ),, ASC, DENSE )
    )&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 01 Jun 2023 11:01:32 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-06-01T11:01:32Z</dc:date>
    <item>
      <title>Using the rankx function  inside a date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-the-rankx-function-inside-a-date-table/m-p/3263540#M120744</link>
      <description>&lt;P&gt;I am defining a date table using dax and instead of creating a seperate calculated column would like to add the following code with the date table code definition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my calc col using rankx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date Rank = 
RANKX ( 'Date', FORMAT ( 'Date[Date], "YYYYMM" ),, ASC, Dense )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add this to the date table code not as a calculated column but within the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ADDCOLUMNS (
    CALENDARAUTO (),
    "Year", YEAR ( [Date] ),
    "Quarter", "Q" &amp;amp; QUARTER ( [Date] ),
    "Month", FORMAT ( [Date], "mmmm" ),
    "Month Number", MONTH ( [Date] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Jun 2023 09:22:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-the-rankx-function-inside-a-date-table/m-p/3263540#M120744</guid>
      <dc:creator>akhaliq7</dc:creator>
      <dc:date>2023-06-01T09:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using the rankx function  inside a date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-the-rankx-function-inside-a-date-table/m-p/3263676#M120757</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307422" data-lia-user-login="akhaliq7" class="lia-mention lia-mention-user"&gt;akhaliq7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please use&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Date =
VAR T =
    CALENDARAUTO ()
RETURN
    ADDCOLUMNS (
        T,
        "Year", YEAR ( [Date] ),
        "Quarter", "Q" &amp;amp; QUARTER ( [Date] ),
        "Month", FORMAT ( [Date], "mmmm" ),
        "Month Number", MONTH ( [Date] ),
        "Date Rank", RANKX ( T, FORMAT ( [Date], "YYYYMM" ),, ASC, DENSE )
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Jun 2023 11:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-the-rankx-function-inside-a-date-table/m-p/3263676#M120757</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-01T11:01:32Z</dc:date>
    </item>
  </channel>
</rss>

