<?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 sum for the year for each month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3808079#M148882</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="15697" data-lia-user-login="danextian" class="lia-mention lia-mention-user"&gt;danextian&lt;/a&gt;&amp;nbsp;, Thank you ! The&amp;nbsp;DATESYTD function did the job.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 13:52:22 GMT</pubDate>
    <dc:creator>Safus09</dc:creator>
    <dc:date>2024-04-03T13:52:22Z</dc:date>
    <item>
      <title>Cumulative sum for the year for each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3805927#M148818</link>
      <description>&lt;P&gt;Hi, I'am new to power BI and Dax queries and I want to calculate a cumulative sum for each month starting from the 01/01 of each year.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example : For period1 of 2023 =&amp;gt; Sum starting from 01/01/2023 until the 31/01/2023&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For period2 of 2023 =&amp;gt; Sum starting from 01/01/2023 until the 28/02/2023 (So Sum of period1 + Period 2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; etc ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For period12 of 2023 =&amp;gt; Sum starting from 01/01/2023 until the 31/12/2023 (So Sum of period1 + Period 2 +&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Perdiod3 + ... + Period12 )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I tried the following :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;DebitExercice = CALCULATE(sum('General ledger attributes'[PRIMARYAMOUNT]), 'General ledger attributes'[ISCREDIT] = "No",
FILTER(
ALLSELECTED('Fiscal periods'[Date],'Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month]),'Fiscal periods'[Date] &amp;gt;= DATE('Fiscal periods'[Fiscal year],01,01) &amp;amp;&amp;amp; 'Fiscal periods'[Date] &amp;lt;= date('Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month],DAY(EOMONTH('Fiscal periods'[Date],0)))))&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;li-code lang="markup"&amp;gt;DebitExercice = CALCULATE(sum('General ledger attributes'[PRIMARYAMOUNT]), 'General ledger attributes'[ISCREDIT] = "No", FILTER( ALLSELECTED('Fiscal periods'[Date],'Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month]),'Fiscal periods'[Date] &amp;gt;= DATE('Fiscal periods'[Fiscal year],01,01) &amp;amp;&amp;amp; 'Fiscal periods'[Date] &amp;lt;= date('Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month],DAY(EOMONTH('Fiscal periods'[Date],0)))))

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;​&lt;BR /&gt;What I'am missing here ?&lt;BR /&gt;The result :&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Apr 2024 21:03:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3805927#M148818</guid>
      <dc:creator>Safus09</dc:creator>
      <dc:date>2024-04-02T21:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for the year for each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3805930#M148819</link>
      <description>&lt;LI-CODE lang="csharp"&gt;DebitExercice = CALCULATE(sum('General ledger attributes'[PRIMARYAMOUNT]), 'General ledger attributes'[ISCREDIT] = "No",
FILTER(
ALLSELECTED('Fiscal periods'[Date],'Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month]),'Fiscal periods'[Date] &amp;gt;= DATE('Fiscal periods'[Fiscal year],01,01) &amp;amp;&amp;amp; 'Fiscal periods'[Date] &amp;lt;= date('Fiscal periods'[Fiscal year],'Fiscal periods'[Period Month],DAY(EOMONTH('Fiscal periods'[Date],0)))))
&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Sorry I don't know how to modify a post, so I repost the corrected used code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 21:06:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3805930#M148819</guid>
      <dc:creator>Safus09</dc:creator>
      <dc:date>2024-04-02T21:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for the year for each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3806112#M148831</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="716843" data-lia-user-login="Safus09" class="lia-mention lia-mention-user"&gt;Safus09&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Assuming you have&amp;nbsp; separate dates table with FY info, try the following&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Transactions YTD FY2 = 
CALCULATE ( [Total Transactions], DATESYTD ( Dates[Date], "Jun 30" ) )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Transactions YTD FY = 
CALCULATE (
    [Total Transactions],
    FILTER (
        ALL ( Dates ),
        Dates[Date] &amp;lt;= MAX ( Dates[Date] )
            &amp;amp;&amp;amp; Dates[FY] = MAX ( Dates[FY] )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Please see attached pbix for details. &lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 23:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3806112#M148831</guid>
      <dc:creator>danextian</dc:creator>
      <dc:date>2024-04-02T23:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative sum for the year for each month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3808079#M148882</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="15697" data-lia-user-login="danextian" class="lia-mention lia-mention-user"&gt;danextian&lt;/a&gt;&amp;nbsp;, Thank you ! The&amp;nbsp;DATESYTD function did the job.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:52:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-sum-for-the-year-for-each-month/m-p/3808079#M148882</guid>
      <dc:creator>Safus09</dc:creator>
      <dc:date>2024-04-03T13:52:22Z</dc:date>
    </item>
  </channel>
</rss>

