<?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: Sum Difference between different date intervals in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3444835#M131034</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226664" data-lia-user-login="sjoerdvn" class="lia-mention lia-mention-user"&gt;sjoerdvn&lt;/a&gt;, somebody on a different forum suggested the exact same solution and it worked.&lt;/P&gt;</description>
    <pubDate>Sun, 24 Sep 2023 17:57:20 GMT</pubDate>
    <dc:creator>AlexIsac16</dc:creator>
    <dc:date>2023-09-24T17:57:20Z</dc:date>
    <item>
      <title>Sum Difference between different date intervals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3433109#M130195</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a measure that calculates the % increase/decrease between the sum of operating profit month to date, and the sum of operating profit during the same time period last month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first part of the formula is pretty straigthforward using the TotalMTD function. Could anyone tell me how to create a dynamic measure that calculates the sum of profit between this day last month and the start date of last month?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 14:46:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3433109#M130195</guid>
      <dc:creator>AlexIsac16</dc:creator>
      <dc:date>2023-09-15T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Difference between different date intervals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3433854#M130226</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="617879" data-lia-user-login="AlexIsac16" class="lia-mention lia-mention-user"&gt;AlexIsac16&lt;/a&gt;&amp;nbsp;Please can you elaborate visually?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2023 07:02:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3433854#M130226</guid>
      <dc:creator>Mahesh0016</dc:creator>
      <dc:date>2023-09-16T07:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Difference between different date intervals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3437658#M130453</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="617879" data-lia-user-login="AlexIsac16" class="lia-mention lia-mention-user"&gt;AlexIsac16&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
var _today=TODAY()
var _date=DATE(YEAR(_today),MONTH(_today)-1,1)
var _laststart=
MINX(
    FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(_date)&amp;amp;&amp;amp;MONTH('Table'[Date])=MONTH(_date)),[Date])
var _lastcurrent=
DATE(
   YEAR(_today),MONTH(_today)-1,DAY(_today))
return
SUMX(
    FILTER(ALL('Table'),
    'Table'[Date]&amp;gt;=_laststart&amp;amp;&amp;amp;'Table'[Date]&amp;lt;=_lastcurrent),[Value])&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 06:38:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3437658#M130453</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-19T06:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Difference between different date intervals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3437805#M130455</link>
      <description>&lt;P&gt;You haven't mentioned the table and column names, but it should be something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;profit last month td = CALULATE(SUM(fact_table[sales]),DATEADD(DATESMTD('date_table'[date]),-1, MONTH))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 07:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3437805#M130455</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2023-09-19T07:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Difference between different date intervals</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3444835#M131034</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226664" data-lia-user-login="sjoerdvn" class="lia-mention lia-mention-user"&gt;sjoerdvn&lt;/a&gt;, somebody on a different forum suggested the exact same solution and it worked.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 17:57:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-Difference-between-different-date-intervals/m-p/3444835#M131034</guid>
      <dc:creator>AlexIsac16</dc:creator>
      <dc:date>2023-09-24T17:57:20Z</dc:date>
    </item>
  </channel>
</rss>

