<?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: Understanding EOMONTH in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061409#M105801</link>
    <description>&lt;P&gt;It is the same as the first solution proposed. You were both right!&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2023 07:35:55 GMT</pubDate>
    <dc:creator>Ackbar-Learner</dc:creator>
    <dc:date>2023-02-04T07:35:55Z</dc:date>
    <item>
      <title>Understanding EOMONTH in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061311#M105792</link>
      <description>&lt;P&gt;Hi, I am having a very strange situation with EOMONTH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the measure I am using to get last day of previous month of either the selected date or today's date whichever comes first:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Board01fActualizedDateSelected = MIN(EOMONTH(TODAY(),-1), EOMONTH([Board01aLastDateSelected],-1))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and this is giving me back this result, which is fine:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now using above measure, I want to calculate the amounts before or equal to the above date. So i used the following measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Board02bP&amp;amp;LAllTransactionAmountwithSignActual = 
VAR Result = sumx(GLChartOfAccounts,
        CALCULATE([P&amp;amp;LAllTransactionAmountEUR],
        FILTER(all(GLAccountClientUser[GLAccountValue]),GLAccountClientUser[GLAccountValue]&amp;lt;4700000),
        FILTER(BudgetCalendar,BudgetCalendar[Date]&amp;lt;=[Board01fActualizedDateSelected]))
        *GLChartOfAccounts[Sign])
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;and the above is returning me Blank, which is not correct.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So i tweaked the above measure by just replacing it with the actual date of 31/01/2023 as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Board02bP&amp;amp;LAllTransactionAmountwithSignActual = 
VAR Result = sumx(GLChartOfAccounts,
        CALCULATE([P&amp;amp;LAllTransactionAmountEUR],
        FILTER(all(GLAccountClientUser[GLAccountValue]),GLAccountClientUser[GLAccountValue]&amp;lt;4700000),
        FILTER(BudgetCalendar,BudgetCalendar[Date]&amp;lt;=date(2023,1,31)))
        *GLChartOfAccounts[Sign])
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;and it works fine with below result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What should i correct to get the EOMONTH measure fine so that it works properly on the second measure because obviously hardcoding a date in a measure is not the way to go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any guidance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 02:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061311#M105792</guid>
      <dc:creator>Ackbar-Learner</dc:creator>
      <dc:date>2023-02-04T02:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding EOMONTH in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061336#M105793</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Board02bP&amp;amp;LAllTransactionAmountwithSignActual =
VAR _Board01fActualizedDateSelected = [Board01fActualizedDateSelected]
VAR Result =
    SUMX (
        GLChartOfAccounts,
        CALCULATE (
            [P&amp;amp;LAllTransactionAmountEUR],
            FILTER (
                ALL ( GLAccountClientUser[GLAccountValue] ),
                GLAccountClientUser[GLAccountValue] &amp;lt; 4700000
            ),
            FILTER (
                BudgetCalendar,
                BudgetCalendar[Date] &amp;lt;= _Board01fActualizedDateSelected
            )
        ) * GLChartOfAccounts[Sign]
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 04 Feb 2023 03:35:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061336#M105793</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-02-04T03:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding EOMONTH in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061340#M105794</link>
      <description>&lt;P&gt;Am I correct that Board01aLastDateSelected measure&amp;nbsp;doesn't rely on a specific GLChartOfAccounts? If so, the measure may be being affected by the context transition of the GLChartOfAccounts row being iterated over in SUMX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something to try is moving that measure reference to a variable outside of that expression and referring to that variable within the FILTER statement so that it is evaluated&amp;nbsp;outside of the currently iterated row context, like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Board02bP&amp;amp;LAllTransactionAmountwithSignActual = 

VAR _actualizedDateSelected = [Board01fActualizedDateSelected]

VAR Result = sumx(GLChartOfAccounts,
        CALCULATE([P&amp;amp;LAllTransactionAmountEUR],
        FILTER(all(GLAccountClientUser[GLAccountValue]),GLAccountClientUser[GLAccountValue]&amp;lt;4700000),
        FILTER(BudgetCalendar,BudgetCalendar[Date]&amp;lt;= _actualizedDateSelected ))
        *GLChartOfAccounts[Sign])
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 03:43:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061340#M105794</guid>
      <dc:creator>andrewpirie</dc:creator>
      <dc:date>2023-02-04T03:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding EOMONTH in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061409#M105801</link>
      <description>&lt;P&gt;It is the same as the first solution proposed. You were both right!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 07:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Understanding-EOMONTH-in-DAX/m-p/3061409#M105801</guid>
      <dc:creator>Ackbar-Learner</dc:creator>
      <dc:date>2023-02-04T07:35:55Z</dc:date>
    </item>
  </channel>
</rss>

