<?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 Index or Rank for month with Stock-Value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3559473#M137142</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I have a table with the following structure:&lt;/P&gt;&lt;P&gt;| Year | Month | EndOfMonth | Article No. | Stock Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The articles do not have a stock quantity in each month. I would now like to write a DAX formula that assigns a rank or index to the month.&lt;BR /&gt;For example, if item X has stock quantities in the months of June, August and December, the rank/index should correspond to 1 for June, 2 for August and 3 for December.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 17:32:00 GMT</pubDate>
    <dc:creator>froebm</dc:creator>
    <dc:date>2023-11-29T17:32:00Z</dc:date>
    <item>
      <title>Index or Rank for month with Stock-Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3559473#M137142</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I have a table with the following structure:&lt;/P&gt;&lt;P&gt;| Year | Month | EndOfMonth | Article No. | Stock Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The articles do not have a stock quantity in each month. I would now like to write a DAX formula that assigns a rank or index to the month.&lt;BR /&gt;For example, if item X has stock quantities in the months of June, August and December, the rank/index should correspond to 1 for June, 2 for August and 3 for December.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:32:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3559473#M137142</guid>
      <dc:creator>froebm</dc:creator>
      <dc:date>2023-11-29T17:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Index or Rank for month with Stock-Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3559548#M137148</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your desired outcome looks like, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a new column, and the result is partitioned by the year and the article number.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your semantic model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/rownumber-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;ROWNUMBER function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&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;expected result CC =
ROWNUMBER (
    Data,
    ORDERBY ( Data[EndOfMonth], ASC ),
    DEFAULT,
    PARTITIONBY ( Data[Year], Data[Article No] ),
    MATCHBY ( Data[EndOfMonth], Data[Article No], Data[Year] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 18:31:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3559548#M137148</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-29T18:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Index or Rank for month with Stock-Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3560410#M137222</link>
      <description>&lt;P&gt;Great, worked perfectly. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:36:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Index-or-Rank-for-month-with-Stock-Value/m-p/3560410#M137222</guid>
      <dc:creator>froebm</dc:creator>
      <dc:date>2023-11-30T07:36:32Z</dc:date>
    </item>
  </channel>
</rss>

