<?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 of a column in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558754#M137097</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653046" data-lia-user-login="silveiralopesa" class="lia-mention lia-mention-user"&gt;silveiralopesa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp;revised your DAX measure. Can you please try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CumulativeSumBotrytis =
VAR CurrentDate = Donnes_SERRE1_2021_2023_test[Date]
VAR ResetGroup =
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL(Donnes_SERRE1_2021_2023_test),
                Donnes_SERRE1_2021_2023_test[Applications fongicides] = TRUE
                &amp;amp;&amp;amp; Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= CurrentDate
            )
        )
    )
RETURN
    CALCULATE(
        SUM(Donnes_SERRE1_2021_2023_test[ColuneBotrytis]),
        FILTER(
            ALL(Donnes_SERRE1_2021_2023_test),
            Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= CurrentDate
            &amp;amp;&amp;amp; CALCULATE(
                COUNTROWS(
                    FILTER(
                        ALL(Donnes_SERRE1_2021_2023_test),
                        Donnes_SERRE1_2021_2023_test[Applications fongicides] = TRUE
                        &amp;amp;&amp;amp; Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= Donnes_SERRE1_2021_2023_test[Date]
                    )
                )
            ) = ResetGroup
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should you have any questions, please do not hesitate to reach out to me.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 11:51:40 GMT</pubDate>
    <dc:creator>Sahir_Maharaj</dc:creator>
    <dc:date>2023-11-29T11:51:40Z</dc:date>
    <item>
      <title>cumulative sum of a column in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558115#M137036</link>
      <description>&lt;P&gt;Good morning, everyone!&lt;/P&gt;&lt;P&gt;I have been trying for a few days to perform the cumulative sum of a column in Power BI that resets the sum to zero when the value in another column (in the same row) is TRUE. At the moment, I managed to perform the cumulative sum and set zero for the rows that have the TRUE value, but it does not restart the cumulative sum after zero, as it should. Here is the DAX code I have so far. Could someone help me perform this cumulative sum correctly? Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;CumulativeSumBotrytis =&lt;BR /&gt;VAR CurrentDate = Donnes_SERRE1_2021_2023_test[Date]&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;Donnes_SERRE1_2021_2023_test[Applications fongicides] = TRUE,&lt;BR /&gt;0,&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUMX(&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL(Donnes_SERRE1_2021_2023_test),&lt;BR /&gt;Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= CurrentDate &amp;amp;&amp;amp;&lt;BR /&gt;Donnes_SERRE1_2021_2023_test[Applications fongicides] &amp;lt;&amp;gt; 1&lt;BR /&gt;),&lt;BR /&gt;Donnes_SERRE1_2021_2023_test[ColuneBotrytis]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 07:44:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558115#M137036</guid>
      <dc:creator>silveiralopesa</dc:creator>
      <dc:date>2023-11-29T07:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative sum of a column in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558754#M137097</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653046" data-lia-user-login="silveiralopesa" class="lia-mention lia-mention-user"&gt;silveiralopesa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp;revised your DAX measure. Can you please try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CumulativeSumBotrytis =
VAR CurrentDate = Donnes_SERRE1_2021_2023_test[Date]
VAR ResetGroup =
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL(Donnes_SERRE1_2021_2023_test),
                Donnes_SERRE1_2021_2023_test[Applications fongicides] = TRUE
                &amp;amp;&amp;amp; Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= CurrentDate
            )
        )
    )
RETURN
    CALCULATE(
        SUM(Donnes_SERRE1_2021_2023_test[ColuneBotrytis]),
        FILTER(
            ALL(Donnes_SERRE1_2021_2023_test),
            Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= CurrentDate
            &amp;amp;&amp;amp; CALCULATE(
                COUNTROWS(
                    FILTER(
                        ALL(Donnes_SERRE1_2021_2023_test),
                        Donnes_SERRE1_2021_2023_test[Applications fongicides] = TRUE
                        &amp;amp;&amp;amp; Donnes_SERRE1_2021_2023_test[Date] &amp;lt;= Donnes_SERRE1_2021_2023_test[Date]
                    )
                )
            ) = ResetGroup
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should you have any questions, please do not hesitate to reach out to me.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 11:51:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558754#M137097</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-11-29T11:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative sum of a column in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558835#M137105</link>
      <description>&lt;P&gt;This DAX resulted in blank spaces only&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":expressionless_face:"&gt;😑&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 12:31:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558835#M137105</guid>
      <dc:creator>silveiralopesa</dc:creator>
      <dc:date>2023-11-29T12:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: cumulative sum of a column in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558870#M137107</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thanks for the answer! BUT it gives me just blank spaces in the new column. For each day we have more then one value in the column "ColuneBotrytis" (one value for each 30 minutes in the day). In the column "Applications fongiques", the "TRUE" or "FALSE" value is repeated in all rows concerning the same date. Maybe this requests a change in the DAX?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 12:49:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/cumulative-sum-of-a-column-in-Power-BI/m-p/3558870#M137107</guid>
      <dc:creator>silveiralopesa</dc:creator>
      <dc:date>2023-11-29T12:49:30Z</dc:date>
    </item>
  </channel>
</rss>

