<?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 Formula  by date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361513#M173151</link>
    <description>&lt;P&gt;Unfortunately, it still has the same result.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2025 12:31:09 GMT</pubDate>
    <dc:creator>AivaS</dc:creator>
    <dc:date>2025-01-13T12:31:09Z</dc:date>
    <item>
      <title>Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361363#M173142</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am been trying to workout why the Cumulative cost is not working, please see my forumal below.&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;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RT Profit =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;MaxDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; )&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[PROFIT M]&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MaxDate&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The results just matching the Profit by month, not cumulative.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the table and Data view.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 10:59:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361363#M173142</guid>
      <dc:creator>AivaS</dc:creator>
      <dc:date>2025-01-13T10:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361375#M173143</link>
      <description>&lt;P&gt;Your RT Profit is a calculated column. Delete the column and use the same code to make a measure.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 11:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361375#M173143</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-01-13T11:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361384#M173146</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="911886" data-lia-user-login="AivaS" class="lia-mention lia-mention-user"&gt;AivaS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your DAX formula for calculating the cumulative profit has a small issue.&lt;/P&gt;&lt;P&gt;Modify your dax like below and try again :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RT Profit =&lt;BR /&gt;VAR MaxDate = MAX('Calendar'[Date])&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[PROFIT M],&lt;BR /&gt;FILTER(&lt;BR /&gt;ALL('Calendar'),&lt;BR /&gt;'Calendar'[Date] &amp;lt;= MaxDate&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 11:14:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361384#M173146</guid>
      <dc:creator>divyed</dc:creator>
      <dc:date>2025-01-13T11:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361513#M173151</link>
      <description>&lt;P&gt;Unfortunately, it still has the same result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 12:31:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361513#M173151</guid>
      <dc:creator>AivaS</dc:creator>
      <dc:date>2025-01-13T12:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361527#M173152</link>
      <description>&lt;P&gt;RT profit is a measure,&amp;nbsp;&lt;BR /&gt;maybe the issue is that in RT profit measure I am using Profit M, measure which is created by the following formula :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PROFIT M =&lt;/SPAN&gt; &lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'summary_by_month'&lt;/SPAN&gt;&lt;SPAN&gt;[profit]&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;since the "profit" is a column and I needed a measure to calculate.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Jan 2025 12:38:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4361527#M173152</guid>
      <dc:creator>AivaS</dc:creator>
      <dc:date>2025-01-13T12:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362764#M173205</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Thanks for the reply from divyed&amp;nbsp;and johnt75&amp;nbsp;, please allow me to provide another insight:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="911886" data-lia-user-login="AivaS" class="lia-mention lia-mention-user"&gt;AivaS&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;The most efficient solution currently is to use visual object calculations:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;Here is my test data: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Initial visualization results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;Click on the visual object and select visual calculation:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3.Here's my final result, which I hope meets your requirements.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;4.&lt;/SPAN&gt;&lt;SPAN&gt;For further details, please refer to&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview" target="_blank"&gt;&lt;SPAN&gt;Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Please find the attached pbix relevant to the case.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 07:11:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362764#M173205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-14T07:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362788#M173207</link>
      <description>&lt;P&gt;Excellent, thank you so much. That was very easy, indeed, however, I will need to use the measure of Running Total in KPI cards, so from testing out it seems the visual calculation only works for that particular visual, and does not create a measure?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 07:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362788#M173207</guid>
      <dc:creator>AivaS</dc:creator>
      <dc:date>2025-01-14T07:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362827#M173209</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thinkI need to add a filter in the formula? it seems then I use the "Calendar" Table, I get this resulin the table ?&amp;nbsp;&lt;BR /&gt;Sum of profit being a column, Profit M being a measure, RT profit is the one I amtrying to work out.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 07:57:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362827#M173209</guid>
      <dc:creator>AivaS</dc:creator>
      <dc:date>2025-01-14T07:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362831#M173210</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="911886" data-lia-user-login="AivaS" class="lia-mention lia-mention-user"&gt;AivaS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested on dummy data and it is working. I have created a measure total_Sales and I have da date table. Please replace your tables accordingly and try again&lt;/P&gt;&lt;P&gt;Here is my dax :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RunningTotalSales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;Datestbl&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;Measurestbl&lt;/SPAN&gt;&lt;SPAN&gt;[TotalSales]&lt;/SPAN&gt;&lt;SPAN&gt; ) ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;Measurestbl&lt;/SPAN&gt;&lt;SPAN&gt;[TotalSales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Datestbl&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt; ()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps .&lt;/P&gt;&lt;P&gt;Did I answer your query ? Mark this as solution if this solves your issue, kudos are appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jan 2025 08:03:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4362831#M173210</guid>
      <dc:creator>divyed</dc:creator>
      <dc:date>2025-01-14T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Formula  by date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4364748#M173275</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="911886" data-lia-user-login="AivaS" class="lia-mention lia-mention-user"&gt;AivaS&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;Thank you for your prompt response.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;You can try the following measure: &lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR table1 =
    SUMMARIZE(
        ALLSELECTED('summary_by_month'),
        'summary_by_month'[Date].[Month],
        "AVG",
        VAR cm = 'summary_by_month'[Date].[Month]
        VAR _averageProfit =
            CALCULATE(
                AVERAGE(summary_by_month[profit]),
                FILTER(
                    ALL(summary_by_month),
                    'summary_by_month'[Date].[Month] = cm
                )
            )
        RETURN _averageProfit,
        "INEDX1",
        SWITCH(
            'summary_by_month'[Date].[Month],
            "January", 1,
            "February", 2,
            "March", 3,
            "April", 4,
            "May", 5,
            "June", 6,
            "July", 7,
            "August", 8,
            "September", 9,
            "October", 10,
            "November", 11,
            "December", 12
        )
    )
 
VAR table2 =
    SUMMARIZE(
        table1,
        'summary_by_month'[Date].[Month],
        [INEDX1],
        "running",
        SUMX(
            FILTER(table1, [INEDX1] &amp;lt;= EARLIER([INEDX1])),
            [AVG]
        )
    )
 
VAR f =
    SUMX(
        FILTER(table1, [INEDX1] = MAX([INEDX1])),
        [AVG]
    )
 
VAR f1 =
    SUMX(
        FILTER(table2, 'summary_by_month'[Date].[Month] = MAX('summary_by_month'[Date].[Month])),
        [running]
    )
 
RETURN
    IF(
        ISINSCOPE('summary_by_month'[Date].[Month]),
        f1,
        f
    )&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;2.Here's my final result, which I hope meets your requirements.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Please find the attached pbix relevant to the case.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 09:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Formula-by-date/m-p/4364748#M173275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-15T09:28:46Z</dc:date>
    </item>
  </channel>
</rss>

