<?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 Total with Max Date Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769187#M3589</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your cumulative measure should be something like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Cumulative Sales Amount =
VAR _MaxDate =
    MAX ( 'Dates'[Date] )
VAR _Result =
    CALCULATE ( [Sales Actual], 'Calendar'[Date] &amp;lt;= _MaxDate )
RETURN
    _Result&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Aug 2019 10:43:41 GMT</pubDate>
    <dc:creator>avanderschilden</dc:creator>
    <dc:date>2019-08-18T10:43:41Z</dc:date>
    <item>
      <title>Cumulative Total with Max Date Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769159#M3587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm very new to PowerBi and need some help with the Cumulative Sum Dax formula. I have the following table of Measures created to show Cumulative Sales for current year (Actual), LY and Budget. The data and formula appears correct.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;However, when I select a specific Month in the slicer, eg Apr, I get incorrect figures for the cumulative totals.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what is wrong and hope someone can help me with this. I've used the following measure for Sales Actual and YTD Sales Actual:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sales Actual = CALCULATE(SUM(SalesData[Sales]),FILTER(SalesData,SalesData[Scenario]="Actual"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YTD Sales Actual = CALCULATE([Sales Actual],FILTER(ALLSELECTED(Dates),Dates[Date] &amp;lt;= MAX(Dates[Date])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many Thanks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 05:28:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769159#M3587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T05:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Total with Max Date Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769187#M3589</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your cumulative measure should be something like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Cumulative Sales Amount =
VAR _MaxDate =
    MAX ( 'Dates'[Date] )
VAR _Result =
    CALCULATE ( [Sales Actual], 'Calendar'[Date] &amp;lt;= _MaxDate )
RETURN
    _Result&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:43:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769187#M3589</guid>
      <dc:creator>avanderschilden</dc:creator>
      <dc:date>2019-08-18T10:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Total with Max Date Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769189#M3590</link>
      <description>&lt;P&gt;This is now solved. I changed from ALLSELECTED to ALL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A similar issued was already solved in attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Desktop/Slicer-selection-changes-the-cumulative-total/td-p/655657" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/Slicer-selection-changes-the-cumulative-total/td-p/655657.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to solve this by changing from ALLSELECTED to ALL.&amp;nbsp; My apologies, I should have reviewed existing forum posts more thoroughly. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:58:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769189#M3590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T10:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Total with Max Date Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769197#M3592</link>
      <description>&lt;P&gt;Thank you avendarschildren. I've tried your solution and it has worked!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 11:19:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Total-with-Max-Date-Filter/m-p/769197#M3592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-18T11:19:19Z</dc:date>
    </item>
  </channel>
</rss>

