<?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 ENDOFMONTH function not working as expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3697872#M143814</link>
    <description>&lt;P&gt;I created a simple date table as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable =
DATATABLE(
    "Date", DATETIME, {
        {"14/2/2024"},
        {"15/2/2024"},
        {"16/2/2024"}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I created a new column using&amp;nbsp;&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;End of Month = ENDOFMONTH(DateTable[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can use EOMONTH which works, but am curious why this doesnt? I expect to get 29 February but it seems like its simply picking the maximum date. Or maybe I failed to understand the documentation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 03:45:19 GMT</pubDate>
    <dc:creator>henry_s</dc:creator>
    <dc:date>2024-02-14T03:45:19Z</dc:date>
    <item>
      <title>ENDOFMONTH function not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3697872#M143814</link>
      <description>&lt;P&gt;I created a simple date table as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable =
DATATABLE(
    "Date", DATETIME, {
        {"14/2/2024"},
        {"15/2/2024"},
        {"16/2/2024"}
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I created a new column using&amp;nbsp;&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;End of Month = ENDOFMONTH(DateTable[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can use EOMONTH which works, but am curious why this doesnt? I expect to get 29 February but it seems like its simply picking the maximum date. Or maybe I failed to understand the documentation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 03:45:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3697872#M143814</guid>
      <dc:creator>henry_s</dc:creator>
      <dc:date>2024-02-14T03:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: ENDOFMONTH function not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3698141#M143828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="689808" data-lia-user-login="henry_s" class="lia-mention lia-mention-user"&gt;henry_s&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right.&lt;/P&gt;&lt;P&gt;The EOMONTH is a date function that returns the last date of the month irrespective of what dates are present in the date table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ENDOFMONTH is a time intelligence function that returns last date in the current context which means for the month and year that corresponds to the row. You can think of it like a max function on date column for the year-month combination.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In documentation, you will find EOMONTH under &lt;STRONG&gt;date and time&lt;/STRONG&gt; functions, while ENDOFMONTH in &lt;STRONG&gt;time intelligence&lt;/STRONG&gt; functions. Time intelligence functions require a date table to operate to their best efficiency while date and time functions don't necessarily need that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 07:00:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3698141#M143828</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-02-14T07:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: ENDOFMONTH function not working as expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3698149#M143829</link>
      <description>&lt;P&gt;Understood thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="644992" data-lia-user-login="govindarajan_d" class="lia-mention lia-mention-user"&gt;govindarajan_d&lt;/a&gt;&amp;nbsp;. Makes sense now, the name is quite misleading.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 07:05:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/ENDOFMONTH-function-not-working-as-expected/m-p/3698149#M143829</guid>
      <dc:creator>henry_s</dc:creator>
      <dc:date>2024-02-14T07:05:15Z</dc:date>
    </item>
  </channel>
</rss>

