<?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: Return value associated with latest date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892465#M93924</link>
    <description>&lt;P&gt;Excellent&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="11780" data-lia-user-login="JohnT" class="lia-mention lia-mention-user"&gt;JohnT&lt;/a&gt; this has now worked and above is understood. Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 14:06:55 GMT</pubDate>
    <dc:creator>KeithC</dc:creator>
    <dc:date>2022-11-08T14:06:55Z</dc:date>
    <item>
      <title>Return value associated with latest date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2891921#M93900</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still relatively new in my DAX journey and looking for some assitance. I have a snippet of a table below and I have tried to create a calculated measure that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. sum of the count&amp;nbsp; for latest date in table so below this would be 2 (6th Dec)&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;sum of the count&amp;nbsp; for second date in table so below this would be 4 (3rd Dec)&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;I managed to get the required figure for point 1 but want this to be independent of other variables so always remains constant&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Latest CMI Count = CALCULATE('Table'[Count Total],filter(ALL('Table'[Date]),'Table'[Date]=max('Table'[Date])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 10:47:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2891921#M93900</guid>
      <dc:creator>KeithC</dc:creator>
      <dc:date>2022-11-08T10:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Return value associated with latest date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892030#M93904</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Prev CMI Count =
VAR MaxDate =
    MAX ( 'Table'[Date] )
VAR PrevDate =
    CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] &amp;lt; MaxDate )
VAR Result =
    CALCULATE ( [Count total], REMOVEFILTERS ( 'Table' ), 'Table'[Date] = PrevDate )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Nov 2022 11:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892030#M93904</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-11-08T11:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Return value associated with latest date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892294#M93919</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have tried this to get the max and the second max and have obtained the correct counts but these change if I have any slicers on my dashboard. Can the DAX formula be modified so the result is constant?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:14:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892294#M93919</guid>
      <dc:creator>KeithC</dc:creator>
      <dc:date>2022-11-08T13:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return value associated with latest date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892356#M93921</link>
      <description>&lt;P&gt;This will ignore any filters from anywhere&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Prev CMI Count =
VAR MaxDate =
    CALCULATE ( MAX ( 'Table'[Date] ), REMOVEFILTERS () )
VAR PrevDate =
    CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] &amp;lt; MaxDate, REMOVEFILTERS () )
VAR Result =
    CALCULATE ( [Count total], REMOVEFILTERS (), 'Table'[Date] = PrevDate )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:34:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892356#M93921</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-11-08T13:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return value associated with latest date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892465#M93924</link>
      <description>&lt;P&gt;Excellent&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="11780" data-lia-user-login="JohnT" class="lia-mention lia-mention-user"&gt;JohnT&lt;/a&gt; this has now worked and above is understood. Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 14:06:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-value-associated-with-latest-date/m-p/2892465#M93924</guid>
      <dc:creator>KeithC</dc:creator>
      <dc:date>2022-11-08T14:06:55Z</dc:date>
    </item>
  </channel>
</rss>

