<?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: Help with Summarize in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907362#M8554</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137324" data-lia-user-login="hansei" class="lia-mention lia-mention-user"&gt;hansei&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That surprises me, since I took your sample data and used it in an empty PBIX:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 04:15:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-22T04:15:06Z</dc:date>
    <item>
      <title>Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907080#M8546</link>
      <description>&lt;P&gt;I'm having trouble understanding summarize and wonder if someone could help me? If I have a table as:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;NAME1&lt;/TD&gt;&lt;TD&gt;DATE1&lt;/TD&gt;&lt;TD&gt;NUM1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;harry&lt;/TD&gt;&lt;TD&gt;1/1/2019&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;harry&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;harry&lt;/TD&gt;&lt;TD&gt;2/1/2019&lt;/TD&gt;&lt;TD&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;sally&lt;/TD&gt;&lt;TD&gt;6/1/2019&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;sally&lt;/TD&gt;&lt;TD&gt;5/1/2019&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;sally&lt;/TD&gt;&lt;TD&gt;4/1/2019&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i would like to use summarize based on the row with the latest date&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;NAME1&lt;/TD&gt;&lt;TD&gt;DATE2&lt;/TD&gt;&lt;TD&gt;NUM2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;harry&lt;/TD&gt;&lt;TD&gt;3/1/2019&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;sally&lt;/TD&gt;&lt;TD&gt;6/1/2019&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first 2 columns are clear to me as,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NewTable = SUMMARIZE( Table ), Table[NAME1], "DATE2", LASTDATE( Table[DATE1] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I am dont' know how to get the corresponding number in the SUMMARIZE function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 21:17:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907080#M8546</guid>
      <dc:creator>hansei</dc:creator>
      <dc:date>2020-01-21T21:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907135#M8548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137324" data-lia-user-login="hansei" class="lia-mention lia-mention-user"&gt;hansei&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be my approach, I sure there are other way to achieve the same &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;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Table 2 = ADDCOLUMNS(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SUMMARIZE('Table', 'Table'[NAME1], "LastDate", max('Table'[DATE1])), "Number", &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var currentName1 = 'Table'[NAME1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; calculate (sum('Table'[NUM1]), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; filter('Table', 'Table'[NAME1] = currentName1), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; filter('Table', 'Table'[DATE1] = [LastDate])))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The Summarize will give you table with names and last dates.&amp;nbsp;&lt;BR /&gt;Then you have to calculate / collect the number value from the table based on Name and last date. There can be multiple names with the same last date (at least in theory). That is why both name and last date are used in the calculate to find the correct value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;jan&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Jan 2020 22:43:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907135#M8548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-21T22:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907241#M8549</link>
      <description>Why don't you simply create measure which finds max date per user and filter out that visual by adding measure into visual level filter.&lt;BR /&gt;&lt;BR /&gt;Max Date =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;MAX ( Table1[Date] ),&lt;BR /&gt;ALLEXCEPT ( Table1, Table1[name] )&lt;BR /&gt;)&lt;BR /&gt;Filter=if(max(table1[date])= [max date],1,0)&lt;BR /&gt;&lt;BR /&gt;And set this filter measure to 1 in visual level filter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Pravin&lt;BR /&gt;&lt;BR /&gt;If it resolves your problem mark it as a solution.&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jan 2020 01:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907241#M8549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-22T01:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907301#M8550</link>
      <description>&lt;P&gt;Hello Anonymous&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unsure why, but your solution doesn't seem to filter on LastDate. It aggregates all row entries withe the SUM(). It does the same even when written&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;filter('Table', 'Table'[NAME1] = currentName1 &amp;amp;&amp;amp; 'Table'[DATE1] = [LastDate] )&lt;/LI-CODE&gt;&lt;P&gt;resulting in e.g. 55 for harry&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 02:52:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907301#M8550</guid>
      <dc:creator>hansei</dc:creator>
      <dc:date>2020-01-22T02:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907310#M8552</link>
      <description>&lt;P&gt;Hellow Anonymous&lt;/a&gt; , the measure is needed when the dataset is consumed. My solution cannot be based on visuals.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 03:01:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907310#M8552</guid>
      <dc:creator>hansei</dc:creator>
      <dc:date>2020-01-22T03:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907318#M8553</link>
      <description>&lt;P&gt;While I know I can do this fairly easily in mashup, I thought SUMMARIZE was the way to go. I ended up with the rather inelegant solution of just adding a calculated column a la&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Num2 = 
        var vc1 = [Name2]
        var vltst = [Date2]
        var vmatches = FILTER( Table, [Name1] = vc1 &amp;amp;&amp;amp; [Date1] = vltst )
        return FIRSTNONBLANK( SELECTCOLUMNS( vmatches, "whatever", [Num1] ), 1 )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Jan 2020 03:06:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907318#M8553</guid>
      <dc:creator>hansei</dc:creator>
      <dc:date>2020-01-22T03:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907362#M8554</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="137324" data-lia-user-login="hansei" class="lia-mention lia-mention-user"&gt;hansei&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That surprises me, since I took your sample data and used it in an empty PBIX:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 04:15:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/907362#M8554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-22T04:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Summarize</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/908572#M8611</link>
      <description>&lt;P&gt;I ended up with this for my DAX:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;T2 = SUMMARIZE( 
    Table, Table[NAME1], 
    "DATE2", LASTDATE( Table[DATE1] ), 
    "NUM2", CALCULATE( FIRSTNONBLANK( Table[NUM1], 1 ), LASTDATE( Table[DATE1] ) )
)&lt;/LI-CODE&gt;&lt;P&gt;wherein the temporary table returned from LASTDATE propagated filter to orginal Table and then to CALCULATE&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 21:14:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Summarize/m-p/908572#M8611</guid>
      <dc:creator>hansei</dc:creator>
      <dc:date>2020-01-22T21:14:46Z</dc:date>
    </item>
  </channel>
</rss>

