<?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: PREVIOUS MONTH returns blank in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2727504#M83433</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342429" data-lia-user-login="FranckGbadamass" class="lia-mention lia-mention-user"&gt;FranckGbadamass&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use any time intelligence calculation, you need a well-formed date table. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must satisfy the following requirements:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;All dates need to be present for the years required. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must always start on January 1 and end on December 31, including all the days in this range. If the report only references fiscal years, then the date table must include all the dates from the first to the last day of a fiscal year. For example, if the fiscal year 2008 starts on July 1, 2007, then the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must include all the days from July 1, 2007 to June 30, 2008.&lt;/LI&gt;
&lt;LI&gt;There needs to be a column with a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;DateTime&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type containing unique values. This column is usually called&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;. Even though the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column is often used to define relationships with other tables, this is not required. Still, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column must contain unique values and should be referenced by the Mark as Date Table feature. In case the column also contains a time part, no time should be used – for example, the time should always be 12:00 am.&lt;/LI&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must be marked as a date table in the model, in case the relationship between the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table and any other table is not based on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT&gt;The result of time intelligence functions has the same data lineage as the date column or table provided as an argument.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT&gt;Note:&amp;nbsp;The result table includes only dates that exist in the dates column.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Please check your Date column, or use something to replace the PREVIOUSMONTH fumction:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Nb_conv M-1 = CALCULATE([Nb_conv_inter],Filter('Date_table',[Date]&amp;lt;=EOMONTH(MAX('Date_table'[Date]),-1)&amp;amp;&amp;amp;[Date]&amp;gt;=EOMONTH(MAX('Date_table'[Date]),-2)+1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2022 02:41:01 GMT</pubDate>
    <dc:creator>v-jianboli-msft</dc:creator>
    <dc:date>2022-08-26T02:41:01Z</dc:date>
    <item>
      <title>PREVIOUS MONTH returns blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2720869#M82966</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to retrieve the&amp;nbsp;&lt;STRONG&gt;nb_conv_int&lt;/STRONG&gt;&amp;nbsp;for the last month so I used&amp;nbsp;&lt;STRONG&gt;PREVIOUS MONTH&amp;nbsp;&lt;/STRONG&gt;as you can see below:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Nb_conv M-1:=CALCULATE([Nb_conv_inter];PREVIOUSMONTH(Date_table[Date]))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But, it returns blank value:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what's going wrong.&amp;nbsp;&lt;A title="File data" href="https://docs.google.com/spreadsheets/d/11swUkqj_S_kI37pfFWQppaTAIn9tFF3Y1mYGsBFxAdM/edit?usp=sharing" target="_blank" rel="nofollow noopener noreferrer"&gt;Here is my data&lt;/A&gt;&amp;nbsp;(if you want to help)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below my data model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 16:08:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2720869#M82966</guid>
      <dc:creator>FranckGbadamass</dc:creator>
      <dc:date>2022-08-23T16:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS MONTH returns blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2727504#M83433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="342429" data-lia-user-login="FranckGbadamass" class="lia-mention lia-mention-user"&gt;FranckGbadamass&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use any time intelligence calculation, you need a well-formed date table. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must satisfy the following requirements:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;All dates need to be present for the years required. The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must always start on January 1 and end on December 31, including all the days in this range. If the report only references fiscal years, then the date table must include all the dates from the first to the last day of a fiscal year. For example, if the fiscal year 2008 starts on July 1, 2007, then the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must include all the days from July 1, 2007 to June 30, 2008.&lt;/LI&gt;
&lt;LI&gt;There needs to be a column with a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;DateTime&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data type containing unique values. This column is usually called&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;. Even though the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column is often used to define relationships with other tables, this is not required. Still, the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column must contain unique values and should be referenced by the Mark as Date Table feature. In case the column also contains a time part, no time should be used – for example, the time should always be 12:00 am.&lt;/LI&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table must be marked as a date table in the model, in case the relationship between the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table and any other table is not based on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;Date&lt;/I&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT&gt;The result of time intelligence functions has the same data lineage as the date column or table provided as an argument.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT&gt;Note:&amp;nbsp;The result table includes only dates that exist in the dates column.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Please check your Date column, or use something to replace the PREVIOUSMONTH fumction:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Nb_conv M-1 = CALCULATE([Nb_conv_inter],Filter('Date_table',[Date]&amp;lt;=EOMONTH(MAX('Date_table'[Date]),-1)&amp;amp;&amp;amp;[Date]&amp;gt;=EOMONTH(MAX('Date_table'[Date]),-2)+1))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Jianbo Li&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 02:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2727504#M83433</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-08-26T02:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: PREVIOUS MONTH returns blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2730697#M83610</link>
      <description>&lt;P&gt;I wouldn't use &lt;STRONG&gt;PREVIOUSMOTH&lt;/STRONG&gt; as it does not work the way people would expect it to. Instead, use a different function,&amp;nbsp;&lt;STRONG&gt;DATEADD&lt;/STRONG&gt;, that does work the way you'd expect.&amp;nbsp;If you want to know how the functions differ, please go to &lt;A href="https://dax.guide/previousmoth" target="_blank" rel="noopener"&gt;https://dax.guide/previousmonth&lt;/A&gt;&amp;nbsp;and &lt;A href="https://dax.guide/dateadd" target="_blank" rel="noopener"&gt;https://dax.guide/dateadd&lt;/A&gt;&amp;nbsp;and see the examples there (they're interactive).&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 07:27:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/PREVIOUS-MONTH-returns-blank/m-p/2730697#M83610</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-28T07:27:25Z</dc:date>
    </item>
  </channel>
</rss>

