<?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: Cummulative sum not working properly (it is adding for previous months also ) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3037271#M104023</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a running sum only within the month, wouldn't it be easier to use TOTALMTD() function ?&lt;/P&gt;
&lt;P&gt;I do not know about the details of your project, but it seems to be the easiest way...&lt;/P&gt;
&lt;P&gt;The formula you used is perfect when you need a running sum on all lines, but for monthly running sum the best is to use TOTALMTD or for quarter TOTALQTD...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know if it suits your needs&lt;/P&gt;
&lt;P&gt;Let us know&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 09:55:31 GMT</pubDate>
    <dc:creator>AilleryO</dc:creator>
    <dc:date>2023-01-23T09:55:31Z</dc:date>
    <item>
      <title>Cummulative sum not working properly (it is adding for previous months also )</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3036946#M104009</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;Code: cum_tot = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;[sum_trip_cost]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ff&lt;/SPAN&gt;&lt;SPAN&gt;[Trip Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;ff&lt;/SPAN&gt;&lt;SPAN&gt;[Trip Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;ff&lt;/SPAN&gt;&lt;SPAN&gt;[Trip 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;It is also adding value for previous month , even in slicer if i select a particular month it still adds last all month's values.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;What i want : if i select 'September' Month in slicer , it will only add in september .&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Jan 2023 07:34:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3036946#M104009</guid>
      <dc:creator>Samarth-Borade</dc:creator>
      <dc:date>2023-01-23T07:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum not working properly (it is adding for previous months also )</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3037044#M104015</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496065" data-lia-user-login="Samarth-Borade" class="lia-mention lia-mention-user"&gt;Samarth-Borade&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;cum_tot = 
CALCULATE (
    [sum_trip_cost],
    FILTER(
        ALL(ff[Trip Date]),
        ff[Trip Date] &amp;lt; MAX (ff[Trip Date] )
            &amp;amp;&amp;amp; YEAR( ff[Trip Date]) = YEAR( MAX (ff[Trip Date] ))
            &amp;amp;&amp;amp; MONTH( ff[Trip Date]) = MONTH( MAX (ff[Trip Date] ))
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 08:36:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3037044#M104015</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T08:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum not working properly (it is adding for previous months also )</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3037271#M104023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a running sum only within the month, wouldn't it be easier to use TOTALMTD() function ?&lt;/P&gt;
&lt;P&gt;I do not know about the details of your project, but it seems to be the easiest way...&lt;/P&gt;
&lt;P&gt;The formula you used is perfect when you need a running sum on all lines, but for monthly running sum the best is to use TOTALMTD or for quarter TOTALQTD...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know if it suits your needs&lt;/P&gt;
&lt;P&gt;Let us know&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 09:55:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cummulative-sum-not-working-properly-it-is-adding-for-previous/m-p/3037271#M104023</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2023-01-23T09:55:31Z</dc:date>
    </item>
  </channel>
</rss>

