<?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: Cumulative total per month over years in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3034023#M103818</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458813" data-lia-user-login="terdudov2" class="lia-mention lia-mention-user"&gt;terdudov2&lt;/a&gt; , Create a date using month year, and then with help from date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date([Year],[Month],1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or separate year, month table can also do with YYYYMM column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example measure without using Window&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] &amp;lt;=max('Date'[date])))&lt;/P&gt;
&lt;P&gt;Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] &amp;lt;=max(date[Date])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running Total/ Cumulative: &lt;A href="https://www.youtube.com/watch?v=h2wsO332LUo&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=41" target="_blank"&gt;https://www.youtube.com/watch?v=h2wsO332LUo&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=41&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Prefer Window function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: &lt;A href="https://youtu.be/nxc_IWl-tTc" target="_blank"&gt;https://youtu.be/nxc_IWl-tTc&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 13:22:51 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2023-01-20T13:22:51Z</dc:date>
    <item>
      <title>Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3034020#M103817</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a formula for cummulative total by month (so if I filter month2, it shows value of month1+month2 etc). It works perfectly fine for data 2022 (I have also tried using date instead of month, but the month worked better for me). However now there is also data for 2023. If I only filter year 2023, it starts calculating cumulative value from 1.1.2023, however, I would like to carry on the balances from 2022 also. Is there any chance to just adjust the formula I use to reach that? Thank you&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 13:20:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3034020#M103817</guid>
      <dc:creator>terdudov2</dc:creator>
      <dc:date>2023-01-20T13:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3034023#M103818</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458813" data-lia-user-login="terdudov2" class="lia-mention lia-mention-user"&gt;terdudov2&lt;/a&gt; , Create a date using month year, and then with help from date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date([Year],[Month],1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or separate year, month table can also do with YYYYMM column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example measure without using Window&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] &amp;lt;=max('Date'[date])))&lt;/P&gt;
&lt;P&gt;Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] &amp;lt;=max(date[Date])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running Total/ Cumulative: &lt;A href="https://www.youtube.com/watch?v=h2wsO332LUo&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=41" target="_blank"&gt;https://www.youtube.com/watch?v=h2wsO332LUo&amp;amp;list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&amp;amp;index=41&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Prefer Window function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: &lt;A href="https://youtu.be/nxc_IWl-tTc" target="_blank"&gt;https://youtu.be/nxc_IWl-tTc&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 13:22:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3034023#M103818</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-20T13:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036510#M103998</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Hello, thanks alot but this does not work in my model. Fox example it does not show any value in months without records. Also I need to use the "month" filter in my report and I cannot use "month" from the date table, because there is no way to make a relation between months (woudl&amp;nbsp; be M:N relation)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 00:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036510#M103998</guid>
      <dc:creator>terdudov2</dc:creator>
      <dc:date>2023-01-23T00:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036597#M104001</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458813" data-lia-user-login="terdudov2" class="lia-mention lia-mention-user"&gt;terdudov2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As amitchandak mentioned, in case of running total cross years, YYYYMM is needed. try to:&lt;/P&gt;&lt;P&gt;1) add a YYYYMM column in your Journal table or in the Date Table. I tried with the date table&lt;/P&gt;&lt;P&gt;2) write a measure like:&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;AmtRT = 
CALCULATE(
    SUM(TableName[Amt]),
    DateTable[YYYYMM]&amp;lt;=MAX(DateTable[YYYYMM])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked like this:&lt;/P&gt;&lt;P&gt;sample dataset:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;datetable:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 02:37:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036597#M104001</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T02:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036601#M104002</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="458813" data-lia-user-login="terdudov2" class="lia-mention lia-mention-user"&gt;terdudov2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you insist to do without a date table. try to:&lt;/P&gt;&lt;P&gt;1) add a column in your Journal table like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YYYYMM2 = FORMAT([Date], "YYYYMM")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) plot a visual with the YYYYMM2 column and a measure like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AmtRT2 = 
CALCULATE(
    SUM(TableName[Amt]),
    TableName[YYYYMM2]&amp;lt;=MAX(TableName[YYYYMM2])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample dataset:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 02:36:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3036601#M104002</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-23T02:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3038809#M104149</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;Hello, thanks alot, I tried this, but does not work for me either. It shows no value for months where there is no record, plus I need to have a filter there for "month", which does not work either&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 20:30:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3038809#M104149</guid>
      <dc:creator>terdudov2</dc:creator>
      <dc:date>2023-01-23T20:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative total per month over years</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3038817#M104150</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;also I shoudl probably say, it works and calculates correct, if I do not filter year or month. But i need these filters for other visuals as well and need them to work&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 20:38:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-total-per-month-over-years/m-p/3038817#M104150</guid>
      <dc:creator>terdudov2</dc:creator>
      <dc:date>2023-01-23T20:38:25Z</dc:date>
    </item>
  </channel>
</rss>

