<?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: Month number in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050698#M105067</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Number of Month =&lt;BR /&gt;RANKX ( 'CALENDAR', FORMAT ( 'CALENDAR'[Date], "YYYYMM" ),, Asc, DENSE ) - 1&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 15:10:01 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-01-30T15:10:01Z</dc:date>
    <item>
      <title>Month number</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050680#M105063</link>
      <description>&lt;P&gt;Hello, I need to have in PowerBI a column which will display number of month in callendar.&lt;/P&gt;&lt;P&gt;At this moment I have an Callendar table created by&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALENDAR = &lt;/SPAN&gt;&lt;SPAN&gt;CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;2018.&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;EOMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Today&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)) function.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now I need a cloumn which will display number of month started from courrent month, for eg.:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;January 2023 (this month) - 0&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;December 2022 - 1&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;November 2022 - 2&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;October 2022 - 3&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;September 2022 - 4&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;etc.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It is crucial to have data alligned with every future months and updated with past.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Every next current month will get "0", and previous "1", and next prev. one "2" etc. till end of created callendar table (the numbers are not from 1-12 range).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 14:55:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050680#M105063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-30T14:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Month number</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050690#M105065</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;DIV&gt;NewColumn =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;DATEDIFF([DATE], TODAY(), MONTH)&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050690#M105065</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-30T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Month number</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050698#M105067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Number of Month =&lt;BR /&gt;RANKX ( 'CALENDAR', FORMAT ( 'CALENDAR'[Date], "YYYYMM" ),, Asc, DENSE ) - 1&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:10:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050698#M105067</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-30T15:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Month number</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050711#M105068</link>
      <description>&lt;P&gt;Thanks it works. I needed only to add "-" before statement to achieve exactly what I want.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Column = -(&lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;[DATE]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 15:14:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Month-number/m-p/3050711#M105068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-30T15:14:16Z</dc:date>
    </item>
  </channel>
</rss>

