<?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: Last month calculation got wrong result when show by daily in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3019004#M102641</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Could you possibly use measure branching for this?&amp;nbsp;&lt;BR /&gt;I.e Calc Last Month MTDAct = CALCULATE([&lt;SPAN&gt;MtdAct], PREVIOUSMONTH('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;PREVIOUSMONTH : Returns a table that contains a column of all dates from the previous month, based on the first date in the&amp;nbsp;&lt;STRONG&gt;Dates&lt;/STRONG&gt;&amp;nbsp;column, in the current context.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/previousmonth-function-dax" target="_blank"&gt;https://learn.microsoft.com/en-us/dax/previousmonth-function-dax&lt;/A&gt;&lt;BR /&gt;So your measure for this month is called in and then the filter is MTD but previous month.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Let me know if this works? Hope its helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2023 10:49:52 GMT</pubDate>
    <dc:creator>JFAR49ER</dc:creator>
    <dc:date>2023-01-13T10:49:52Z</dc:date>
    <item>
      <title>Last month calculation got wrong result when show by daily</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3018958#M102636</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;I would like to seek support from team, I am facing calculation of last month and got imporper result when show by dialy.&lt;/P&gt;&lt;P&gt;calculate MtdAct:&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SaleInvMovement&lt;/SPAN&gt;&lt;SPAN&gt;[SaleAmt_Amt]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;DATESMTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calulate LM_MtdAct:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MeasureTable&lt;/SPAN&gt;&lt;SPAN&gt;[MtdAct]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&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;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am apreciated for help. Thanks&lt;/P&gt;&lt;P&gt;LC Aynar&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 10:32:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3018958#M102636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-13T10:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Last month calculation got wrong result when show by daily</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3019004#M102641</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Could you possibly use measure branching for this?&amp;nbsp;&lt;BR /&gt;I.e Calc Last Month MTDAct = CALCULATE([&lt;SPAN&gt;MtdAct], PREVIOUSMONTH('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;PREVIOUSMONTH : Returns a table that contains a column of all dates from the previous month, based on the first date in the&amp;nbsp;&lt;STRONG&gt;Dates&lt;/STRONG&gt;&amp;nbsp;column, in the current context.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/previousmonth-function-dax" target="_blank"&gt;https://learn.microsoft.com/en-us/dax/previousmonth-function-dax&lt;/A&gt;&lt;BR /&gt;So your measure for this month is called in and then the filter is MTD but previous month.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Let me know if this works? Hope its helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 10:49:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3019004#M102641</guid>
      <dc:creator>JFAR49ER</dc:creator>
      <dc:date>2023-01-13T10:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Last month calculation got wrong result when show by daily</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3020543#M102742</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397903" data-lia-user-login="JFAR49ER" class="lia-mention lia-mention-user"&gt;JFAR49ER&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks your for your prompt help, however, the result is still improper figure stated below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LM_MTDAct_new = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MeasureTable&lt;/SPAN&gt;&lt;SPAN&gt;[MtdAct]&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;SPAN&gt;PREVIOUSMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am appreciated for any solution. Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LCAynar&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 14 Jan 2023 01:10:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-month-calculation-got-wrong-result-when-show-by-daily/m-p/3020543#M102742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-14T01:10:59Z</dc:date>
    </item>
  </channel>
</rss>

