<?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 max table filter not working in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304089#M22619</link>
    <description>&lt;P&gt;In my calendar table I have 2 columns other than my key date field one is to say 'yes' or 'no' depending on if the period has been closed by accounting and the second to show a user friendly display of the fiscal period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried several formuals but most recently this simple one is providing incorrect data and I am not sure why&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last Period Closed = var LastClosed = CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER(ALLEXCEPT('Calendar','Calendar'[AccountPeriodClosed]),MAX('Calendar'[AccountPeriodClosed])="Yes"))&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;LastClosed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This returns a value of the very last fiscal period (FY30 Sep) in the table which is some 10 years in the future and therefore marked as "no" on the account closed period.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Why isn't the AccountPeriodClosed filter working in this formula? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ultimately I need to override some outside page filters so that I can view all the periods and then pick the last one where AccountPeriodClosed = Yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 18 Aug 2020 12:35:59 GMT</pubDate>
    <dc:creator>Mmahachi</dc:creator>
    <dc:date>2020-08-18T12:35:59Z</dc:date>
    <item>
      <title>max table filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304089#M22619</link>
      <description>&lt;P&gt;In my calendar table I have 2 columns other than my key date field one is to say 'yes' or 'no' depending on if the period has been closed by accounting and the second to show a user friendly display of the fiscal period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried several formuals but most recently this simple one is providing incorrect data and I am not sure why&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last Period Closed = var LastClosed = CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER(ALLEXCEPT('Calendar','Calendar'[AccountPeriodClosed]),MAX('Calendar'[AccountPeriodClosed])="Yes"))&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;LastClosed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This returns a value of the very last fiscal period (FY30 Sep) in the table which is some 10 years in the future and therefore marked as "no" on the account closed period.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Why isn't the AccountPeriodClosed filter working in this formula? &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ultimately I need to override some outside page filters so that I can view all the periods and then pick the last one where AccountPeriodClosed = Yes&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Aug 2020 12:35:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304089#M22619</guid>
      <dc:creator>Mmahachi</dc:creator>
      <dc:date>2020-08-18T12:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: max table filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304143#M22620</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="68346" data-lia-user-login="Mmahachi" class="lia-mention lia-mention-user"&gt;Mmahachi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last Period Closed =
VAR LastClosed =
    CALCULATE (
        MAX ( 'Calendar'[Fiscal Period Display] ),
        FILTER (
            'Calendar',
            'Calendar'[AccountPeriodClosed]
        ) = "Yes"
    )
RETURN
    LastClosed
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 12:51:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304143#M22620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-18T12:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: max table filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304225#M22623</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="68346" data-lia-user-login="Mmahachi" class="lia-mention lia-mention-user"&gt;Mmahachi&lt;/a&gt; , I need some data to suggest. Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last Period Closed = &lt;BR /&gt;var _LastClosed = maxx(filter(allselected('Calendar'),'Calendar'[AccountPeriodClosed]="Yes"),[AccountPeriodClosed])&lt;/P&gt;
&lt;P&gt;return&lt;BR /&gt;CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER('Calendar','Calendar'[AccountPeriodClosed] =_LastClosed ))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Last Period Closed = &lt;BR /&gt;var _LastClosed = maxx(filter(allselected('Calendar'),'Calendar'[AccountPeriodClosed]="Yes"),[AccountPeriodClosed])&lt;/P&gt;
&lt;P&gt;return&lt;BR /&gt;CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER(allselected('Calendar'),'Calendar'[AccountPeriodClosed] =_LastClosed ))&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 13:15:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304225#M22623</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-18T13:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: max table filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304574#M22646</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; you might want to keep the "yes" inside parenthesis &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 15:18:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/max-table-filter-not-working/m-p/1304574#M22646</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-08-18T15:18:46Z</dc:date>
    </item>
  </channel>
</rss>

