<?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: Filter Last Value based on the max/lastdate and sum the correct total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456700#M27420</link>
    <description>&lt;P&gt;Ask a question to the internet and the internet comes through. Thanks friend, you're brilliant.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Oct 2020 01:08:21 GMT</pubDate>
    <dc:creator>mcinnisbr</dc:creator>
    <dc:date>2020-10-27T01:08:21Z</dc:date>
    <item>
      <title>Filter Last Value based on the max/lastdate and sum the correct total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456589#M27415</link>
      <description>&lt;P&gt;Hi.&lt;BR /&gt;I have a survey input table where, evetually, the same customers will submit the most recent count of a required value. I'm able to filter out previous submissions to display the most recent count based on MAX/ last date.&amp;nbsp; (Using either below measures).&amp;nbsp; However, i'd like the total column to also sum up the values for the most recent MAX/;last date.&amp;nbsp; The totals row is showing the most recent MAX value as the total (9) in my table view, but i'd like to see (31) if possible.&amp;nbsp; Not sure if i'm doing this the correct way. Help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LastestDate = CALCULATE (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUM ( 'table'[customer current count]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER ( ALL ( 'table' ), 'table'[Start time] = MAX('table'[Start time] ) ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUES ('testdata-w-data'[What VAW agency are you reporting for?])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;or&amp;nbsp;&lt;/STRONG&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Lastestdate = &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;SUM('table' [customer current count]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER ( ALL ( 'table' ), 'table'[Start time] = MAX('table'[Start time] )))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&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>Tue, 27 Oct 2020 00:05:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456589#M27415</guid>
      <dc:creator>mcinnisbr</dc:creator>
      <dc:date>2020-10-27T00:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Last Value based on the max/lastdate and sum the correct total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456678#M27419</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="147658" data-lia-user-login="mcinnisbr" class="lia-mention lia-mention-user"&gt;mcinnisbr&lt;/a&gt;&amp;nbsp;adding a sumx function to iterate the fields in the rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;try this code&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Lastestdate =
SUMX(VALUES('table'[CustomerName]),
VAR _MaxDate=CALCULATE(MAX('table'[Start time] ))
RETURN
CALCULATE(
SUM('table' [customer current count]),
FILTER ( ALL ( 'table' ), 'table'[Start time] = _MaxDate )))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 27 Oct 2020 00:17:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456678#M27419</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2020-10-27T00:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Last Value based on the max/lastdate and sum the correct total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456700#M27420</link>
      <description>&lt;P&gt;Ask a question to the internet and the internet comes through. Thanks friend, you're brilliant.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 01:08:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Last-Value-based-on-the-max-lastdate-and-sum-the-correct/m-p/1456700#M27420</guid>
      <dc:creator>mcinnisbr</dc:creator>
      <dc:date>2020-10-27T01:08:21Z</dc:date>
    </item>
  </channel>
</rss>

