<?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: Remove Months from Cumulative Total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2764041#M85783</link>
    <description>&lt;P&gt;Thank you very much. &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;P&gt;It works with MAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I adapted the solution a bit and now it works as it should:&lt;/P&gt;&lt;PRE&gt;IF(&lt;BR /&gt;   MAX( 'Date'[YM] ) &amp;gt; FORMAT( TODAY(), "YYYYMM" ),&lt;BR /&gt;   BLANK(),&lt;BR /&gt;   CALCULATE([Cash], FILTER( ALL( 'Date' ), 'Date'[Date] &amp;lt;= MAX( 'Date'[Date] ) )&lt;BR /&gt;))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 10:11:48 GMT</pubDate>
    <dc:creator>TimmK</dc:creator>
    <dc:date>2022-09-13T10:11:48Z</dc:date>
    <item>
      <title>Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763537#M85728</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;I use the following measure to get my cumulative total:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Cash]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It generally works fine. However, in the visual months are displayed that have not been reached yet (in this case October, November, December 2022).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How can I adapt my measure so that these months are not included in the visual?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Also, how I can I also accomplish the same by using relative date in the visual? I can for example select in the last 100 calendar months, but not in the last 100 calendar months AND the current calender month. How can I include the current calendar month?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:34:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763537#M85728</guid>
      <dc:creator>TimmK</dc:creator>
      <dc:date>2022-09-13T07:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763553#M85731</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt; , Assume you have table with date &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure =&lt;/P&gt;
&lt;P&gt;var _max = maxx(allselected(Table), Table[Date])&lt;/P&gt;
&lt;P&gt;return&lt;/P&gt;
&lt;P&gt;CALCULATE([Cash],FILTER(ALL('Date'),'Date'[Date]&amp;lt;=MAX('Date'[Date]) &amp;amp;&amp;amp; Date[Date] &amp;lt;= _max))&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:37:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763553#M85731</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-13T07:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763642#M85739</link>
      <description>&lt;P&gt;Thanks, I tried it, but it did not work, the result is the same as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_max&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&l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GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763642#M85739</guid>
      <dc:creator>TimmK</dc:creator>
      <dc:date>2022-09-13T09:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763867#M85762</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measur =
CALCULATE (
    [Cash],
    'Date'[Date] &amp;lt;= MIN ( 'Date'[Date] ),
    'Date'[Date] &amp;lt;= TODAY (),
    ALL ( 'Date' )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 09:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763867#M85762</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-13T09:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763933#M85774</link>
      <description>&lt;P&gt;I just tried it, but it results in exactly the same as previously, I still see the months October, November, December 2022 in the visual.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 09:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763933#M85774</guid>
      <dc:creator>TimmK</dc:creator>
      <dc:date>2022-09-13T09:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763962#M85777</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Then try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measur =
IF (
    MIN ( 'Date'[Date] ) &amp;lt;= TODAY (),
    CALCULATE ( [Cash], 'Date'[Date] &amp;lt;= MAX ( 'Date'[Date] ), ALL ( 'Date' ) )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;*Edited&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Changed MAX to MIN in the IF statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 10:00:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2763962#M85777</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-13T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Months from Cumulative Total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2764041#M85783</link>
      <description>&lt;P&gt;Thank you very much. &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;P&gt;It works with MAX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I adapted the solution a bit and now it works as it should:&lt;/P&gt;&lt;PRE&gt;IF(&lt;BR /&gt;   MAX( 'Date'[YM] ) &amp;gt; FORMAT( TODAY(), "YYYYMM" ),&lt;BR /&gt;   BLANK(),&lt;BR /&gt;   CALCULATE([Cash], FILTER( ALL( 'Date' ), 'Date'[Date] &amp;lt;= MAX( 'Date'[Date] ) )&lt;BR /&gt;))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 10:11:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-Months-from-Cumulative-Total/m-p/2764041#M85783</guid>
      <dc:creator>TimmK</dc:creator>
      <dc:date>2022-09-13T10:11:48Z</dc:date>
    </item>
  </channel>
</rss>

