<?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 Measure not working for running total with conditions (built on measures) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1860449#M39852</link>
    <description>&lt;P&gt;Please can someone help with this measure for a running total. The Power BI report with the model is available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example files &lt;A href="https://we.tl/t-cWZbvGXjxJ" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to replicate the calculation in column E from the Excel file. This calculation in Excel caps the lowest value from column D i.e. if it's less than 0, it caps it at 0 so that negative numbers don't accumulate in the running total excessively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to add this condition into my running total measure. This is the measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running Total Incorrect =&lt;BR /&gt;VAR Reference = SELECTEDVALUE( 'DummyDataDemand'[ID], 0 )&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER (&lt;BR /&gt;SUMMARIZE ( ALLSELECTED ('DummyDataID'), DummyDataID[ID],&lt;BR /&gt;"RunningTotal", [Exceeded Amount] ),&lt;BR /&gt;'DummyDataID'[ID] &amp;lt;= Reference ),&lt;BR /&gt;[RunningTotal] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried to add ADDCOLUMNS to this measure (because summarize used in this way has been depreciated) but I can't get it to work. Help with this would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 17:02:05 GMT</pubDate>
    <dc:creator>DataNoobie</dc:creator>
    <dc:date>2021-05-26T17:02:05Z</dc:date>
    <item>
      <title>Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1860449#M39852</link>
      <description>&lt;P&gt;Please can someone help with this measure for a running total. The Power BI report with the model is available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example files &lt;A href="https://we.tl/t-cWZbvGXjxJ" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to replicate the calculation in column E from the Excel file. This calculation in Excel caps the lowest value from column D i.e. if it's less than 0, it caps it at 0 so that negative numbers don't accumulate in the running total excessively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to add this condition into my running total measure. This is the measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running Total Incorrect =&lt;BR /&gt;VAR Reference = SELECTEDVALUE( 'DummyDataDemand'[ID], 0 )&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER (&lt;BR /&gt;SUMMARIZE ( ALLSELECTED ('DummyDataID'), DummyDataID[ID],&lt;BR /&gt;"RunningTotal", [Exceeded Amount] ),&lt;BR /&gt;'DummyDataID'[ID] &amp;lt;= Reference ),&lt;BR /&gt;[RunningTotal] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried to add ADDCOLUMNS to this measure (because summarize used in this way has been depreciated) but I can't get it to work. Help with this would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 17:02:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1860449#M39852</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-26T17:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1861698#M39893</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can try this measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Running total =
VAR currId =
    SELECTEDVALUE ( DummyDataID[ID] )
VAR _t =
    ADDCOLUMNS (
        SUMMARIZE ( ALLSELECTED ( DummyDataID[ID] ), DummyDataID[ID] ),
        "@eamt", IF ( [Exceeded Amount] &amp;lt; 0, 0, [Exceeded Amount] )
    )
VAR res =
    SUMX ( FILTER ( _t, [ID] &amp;lt;= currId ), [@eamt] )
RETURN
    res&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#333399"&gt;&lt;EM&gt;If this post helps, then please consider &lt;U&gt;Accept it as the solution&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;to help the other members find it more quickly.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 07:08:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1861698#M39893</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-25T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862323#M39902</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt; the measure doesn't give me the desired result e.g. the pattern shown below, in column E.&amp;nbsp; Is it possible to recreate this as a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Tue, 25 May 2021 09:49:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862323#M39902</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-25T09:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862521#M39907</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry, I've misunderstood your requirements.&lt;/P&gt;&lt;P&gt;Here is an option that requires creation of 2 measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#RT = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR RTAmt =
    CALCULATE (
        SUMX( DummyDataDemand, [Exceeded Amount]),
        FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID )
    )
RETURN RTAmt&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;#RT_filtered = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR firstID = MINX ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] )
VAR minValue = MINX ( FILTER ( DummyDataID, DummyDataID[ID] = firstID ), [Exceeded Amount] )
VAR RTAmt =
    CALCULATE (
        SUMX( DummyDataDemand, [Exceeded Amount]),
        FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID )
    )
VAR minOfSum =
    MIN (
        0,
        MINX ( FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID ), [#RT] )
    )
RETURN
    IF (
        currentID = firstID &amp;amp;&amp;amp; minValue &amp;lt; 0,
        RTAmt - minValue,
        RTAmt - minOfSum
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#333399"&gt;&lt;EM&gt;If this post helps, then please consider &lt;U&gt;Accept it as the solution&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;to help the other members find it more quickly.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 11:09:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862521#M39907</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-25T11:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862772#M39914</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;this is amazing - thank you so much for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 13:18:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862772#M39914</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-25T13:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862821#M39915</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;How would I get the highest number from that #RT_Filtered column and a sum of the values from that column in two separate measures?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 13:47:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1862821#M39915</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-25T13:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863066#M39924</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#RT with sum = 
IF(HASONEVALUE(DummyDataID[ID]), [#RT_filtered], SUMX(VALUES(DummyDataID[ID]), [#RT_filtered]))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;#RT max = 
MAXX(
    ADDCOLUMNS(
        SUMMARIZE(DummyDataID, DummyDataID[ID]),
        "@RT", [#RT with sum]
    ),
    [#RT with sum]
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT size="2" color="#333399"&gt;&lt;EM&gt;If this post helps, then please consider &lt;U&gt;Accept it as the solution&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;to help the other members find it more quickly.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:17:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863066#M39924</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-25T16:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863078#M39925</link>
      <description>&lt;P&gt;Thank you - I can't thank you enough!&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:27:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863078#M39925</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-25T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863173#M39928</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;When I apply the measures into my original Power BI report (with real data) the numbers are too large and I suspect it's because I've got a date table. I've added this into the example model. How would I cater for the date and the other table I use for filtering? Do I need to add in another condtion somewhere i.e. for selected date and selected category (e.g. Filter A)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added a calendar table into the PowerBI model to illustrate the problem. The new file is &lt;A href="https://we.tl/t-lMAq4H6uTA" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;e.g.&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;#RT = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR RTAmt =
    CALCULATE (
        SUMX( DummyDataDemand, [Exceeded Amount]),
        FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID 
        // e.g. do I add something here, like:
        &amp;amp;&amp;amp; ALLSELECTED ( Category ) &amp;amp;&amp;amp; ALLSELECTED ( Date ) )
    )
RETURN RTAmt&lt;/LI-CODE&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;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if I should post this as a new question.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 20:05:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1863173#M39928</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-25T20:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864271#M39949</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;In your example the Date column in the DummyDataDemand table was of Text type. In this case Date filter won't work. I assume you need to be able to filter data by date as well. So I've changed it to the correct type (Date).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#RT = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR RTAmt =
    CALCULATE (
        SUMX( DummyDataDemand, [Exceeded Amount]) / COUNT(DateTable[Date]),
        FILTER ( ALLSELECTED ( DummyDataID), DummyDataID[ID] &amp;lt;= currentID )
    )
RETURN RTAmt&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;#RT_filtered = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR firstID = MINX ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] )
VAR minValue = MINX ( FILTER ( DummyDataID, DummyDataID[ID] = firstID ), [Exceeded Amount] )
VAR RTAmt =
    CALCULATE (
       SUMX( DummyDataDemand, [Exceeded Amount]) / COUNT(DateTable[Date]),
        FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID )
    )

VAR minOfSum =
    MIN (
        0,
        MINX ( FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID ), [#RT] )
    )
RETURN 
IF (
        currentID = firstID &amp;amp;&amp;amp; minValue &amp;lt; 0,
        RTAmt - minValue,
        RTAmt - minOfSum
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT size="2" color="#333399"&gt;&lt;EM&gt;If this post helps, then please consider &lt;U&gt;Accept it as the solution&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;to help the other members find it more quickly.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 08:04:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864271#M39949</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-26T08:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864546#M39951</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt; thanks for looking at this. It works when there aren't any date filters applied but not when some dates are selected in the report filter e.g.:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 09:31:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864546#M39951</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-26T09:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864586#M39952</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I've used a slicer for dates. But with filters it works the same way:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 09:43:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864586#M39952</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-26T09:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864681#M39954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt; it looks like I have something going on with my real data because it works fine when I filter it for one date but not when other filters are applied. I'm trying to work out what's going on with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 10:40:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1864681#M39954</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-26T10:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865173#M39962</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp; I've added more data to replicate the issue I'm having that I've trying fix today. Here is the &lt;A href="https://we.tl/t-5BBQ1KMBdN" target="_self"&gt;file&lt;/A&gt;. The running total doesn't work like it did in the first example. Can the measures me modified so that they will work with this example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Wed, 26 May 2021 14:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865173#M39962</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-26T14:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865422#M39969</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="298473" data-lia-user-login="DataNoobie" class="lia-mention lia-mention-user"&gt;DataNoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We need to change the solution in 2 measures&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;:&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;#RT = 
CALCULATE(
    SUMX(
        ADDCOLUMNS(
            SUMMARIZE(
                DummyDataID, DummyDataID[ID]
            ),
            "ExAmt", 
            [Exceeded Amount]
        ),
        [ExAmt]
    ),
    FILTER(ALLSELECTED(DummyDataID), DummyDataID[ID] &amp;lt;= MAX(DummyDataDemand[ID]))
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;#RT_filtered = 
VAR currentID = SELECTEDVALUE ( DummyDataID[ID] )
VAR firstID = MINX ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] )
VAR minValue = MINX ( FILTER ( DummyDataID, DummyDataID[ID] = firstID ), [Exceeded Amount] )
VAR minOfSum =
    MIN (
        0,
        MINX ( FILTER ( ALLSELECTED ( DummyDataID ), DummyDataID[ID] &amp;lt;= currentID ), [#RT] )
    )
RETURN 
IF (
        currentID = firstID &amp;amp;&amp;amp; minValue &amp;lt; 0,
        [#RT] - minValue,
        [#RT] - minOfSum
    )&lt;/LI-CODE&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;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#333399"&gt;&lt;EM&gt;If this post helps, then please consider &lt;U&gt;Accept it as the solution&lt;/U&gt; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;to help the other members find it more quickly.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 16:32:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865422#M39969</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-05-26T16:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865459#M39970</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;&amp;nbsp;Thank you. This works perfectly with my data model.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 17:00:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1865459#M39970</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-05-26T17:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1901281#M40999</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291363" data-lia-user-login="ERD" class="lia-mention lia-mention-user"&gt;ERD&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 4 working measures that you created, prefixed with #&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://we.tl/t-601fFuIvJb" target="_self" rel="nofollow noopener noreferrer"&gt;in this example Power BI report.&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;The measures work fine with the example data but and small samples but when I use real data (approx. 90 million imported rows with filters applied to reduce the dataset for scenario testing) I get out of memory errors on some visuals, unless I apply more filters to reduce the dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a way to re-write these measures so that they will work better with a large dataset?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I've looked optimal dax patterns, in particular this solution from: &lt;A href="https://www.sqlbi.com/articles/optimizing-nested-iterators-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/optimizing-nested-iterators-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sales Amount Optimal&amp;nbsp;:=&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUMX&amp;nbsp;(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VALUES&amp;nbsp;(&amp;nbsp;Customer[Customer Discount]&amp;nbsp;),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUMX&amp;nbsp;(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VALUES&amp;nbsp;(&amp;nbsp;'Product'[Product Discount]&amp;nbsp;),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VAR&amp;nbsp;DiscountedProduct&amp;nbsp;=&amp;nbsp;1&amp;nbsp;-&amp;nbsp;'Product'[Product Discount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VAR&amp;nbsp;DiscountedCustomer&amp;nbsp;=&amp;nbsp;1&amp;nbsp;-&amp;nbsp;Customer[Customer Discount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RETURN&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Gross Amount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;DiscountedProduct&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&amp;nbsp;DiscountedCustomer&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure I need to get into this pattern (I'm assuming) is below. How do I change it to get into the pattern (the pattern above isn't using a running total)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#RT =&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CALCULATE&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUMX(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ADDCOLUMNS(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SUMMARIZE(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;DummyDataID, DummyDataID[ID]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"ExAmt",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[Exceeded Amount]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;[ExAmt]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FILTER(ALLSELECTED(DummyDataID), DummyDataID[ID] &amp;lt;= MAX(DummyDataDemand[ID]))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 11:58:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/1901281#M40999</guid>
      <dc:creator>DataNoobie</dc:creator>
      <dc:date>2021-06-15T11:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not working for running total with conditions (built on measures)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/2594915#M74861</link>
      <description>&lt;P&gt;Hello ERD !&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reading your post I though I would have solution I look for DAYS !! But I did try and get blocked...&lt;/P&gt;&lt;P&gt;I got nearly the same issue described in below linked, but adaptating your solution to my issue does not work. If you may have a few minutes to have a look I would be sooooooo gratful !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Cumulative-total-from-Matrix-column/m-p/2592990#M74741" target="_blank" rel="noopener"&gt;Cumulative-total-from-Matrix-column&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what I have tried - knowwing that Demand is a measure, taking Max (Forecast,OpenOrder), Forecast is a CAlculate from forecast table, OpenOrder is a calculate from Order Book table. Then I cannot do a SumX of Demand as Demand is not in one table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Demand_Cumulative_Step1 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;currentWeek&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;DateTable[WeeknYear]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;RTAmt&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Demand]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; (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t; = &lt;/SPAN&gt;&lt;SPAN&gt;firstID&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;minValue&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RTAmt&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;minValue&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RTAmt&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;minOfSum&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Demand Step1 is not starting the good week and taked the max of cumulative forecast vs cumulative order, while I want to simply do cumulative of demand line&lt;/DIV&gt;&lt;DIV&gt;Demand Step2 is showing same Demand Step1 and even worse, adding multiple line for FAXTX data whichi is from another table, linked to Product.&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any Idea pelase ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks you so much !&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jun 2022 12:19:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-working-for-running-total-with-conditions-built-on/m-p/2594915#M74861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-22T12:19:19Z</dc:date>
    </item>
  </channel>
</rss>

