<?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: Incorrect Running Total based on Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1510233#M29334</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can't attach it for security reasons.... then create a file with meaningless data that will re-create the issue and then attach it. Simple.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 08:14:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-23T08:14:51Z</dc:date>
    <item>
      <title>Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508643#M29261</link>
      <description>&lt;P&gt;I have a measure that calculates a value daily, and I'm trying to get a running total of that value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My baseline measure is in the middle column; that's the value I'd like a running total for.&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;Here's the DAX for my running total column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AUM DifferenceDailyDiscountedCFs $ RT = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR MaxDate = MAX(DailyAssets[as_of_date])&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;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[AUM DifferenceDailyDiscountedCFs $],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DailyAssets[as_of_date] &amp;lt;= MaxDate,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL(DailyAssets[as_of_date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In the image above, I'd expect the RT column to return -$286,940.50, followed by -$923,368.19 (derived from -$286,940.50 + -$636,427.69).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please help.. Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Nov 2020 11:56:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508643#M29261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-21T11:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508646#M29262</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Have you got a date table in your model and created a correct relationship??&lt;BR /&gt;&lt;BR /&gt;In your formula, you have assigned the [as of date] column but the screenshot shows you have used the [Date] column. Either use the correct date column or modify your formula:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AUM DifferenceDailyDiscountedCFs $ RT = 
VAR MaxDate =  MAX(DailyAssets[as_of_date])
RETURN
CALCULATE(
    [AUM DifferenceDailyDiscountedCFs $],
    DailyAssets[as_of_date] &amp;lt;= MaxDate,
    ALL(DailyAssets[as_of_date])
)&lt;/LI-CODE&gt;&lt;P&gt;If you are using the date table then,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AUM DifferenceDailyDiscountedCFs $ RT = 
VAR MaxDate =  MAX(Dates[Date])
RETURN
CALCULATE(
    [AUM DifferenceDailyDiscountedCFs $],
    Dates[Date] &amp;lt;= MaxDate,
    ALL(Dates[Date])
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 12:08:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508646#M29262</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-11-21T12:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508656#M29265</link>
      <description>&lt;P&gt;Good catch, but still returning incorrect result unfortunately. Updated measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AUM DifferenceDailyDiscountedCFs $ RT = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR MaxDate = MAX('Calendar'[Date])&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;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[AUM DifferenceDailyDiscountedCFs $],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Calendar'[Date] &amp;lt;= MaxDate,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALL('Calendar'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 12:38:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508656#M29265</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-21T12:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508662#M29268</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, why not attach your pbix file for a quick troubleshooting; such a running total issue isn't supposed to be that complicated.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 12:38:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508662#M29268</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2020-11-21T12:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508664#M29270</link>
      <description>&lt;P&gt;Unfortunately, I'm not able to attach the file for security reasons.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 12:52:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1508664#M29270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-21T12:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Running Total based on Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1510233#M29334</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can't attach it for security reasons.... then create a file with meaningless data that will re-create the issue and then attach it. Simple.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 08:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Incorrect-Running-Total-based-on-Measure/m-p/1510233#M29334</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-23T08:14:51Z</dc:date>
    </item>
  </channel>
</rss>

