<?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: Multiple date filters in calculatetable in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005736#M44571</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt; , thanks a lot for taking the time to answer, but I am not sure it responds to the question i had. In any case, it is much appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Aug 2021 12:23:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-09T12:23:34Z</dc:date>
    <item>
      <title>Multiple date filters in calculatetable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005093#M44555</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I saw this code snippet in a wokrshop held by Jeffrey Wang. The snippet defines a measure to calculate the number of returning customers&amp;nbsp; by date, in a very standard data model with sales, products and customers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# NEW customers = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR vCustomersThisPeriod= VALUES(Appended_actuals[CustomerID])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var vCurrentdate = MIN('Date'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;FONT color="#00FF00"&gt;var VCustomersPreviousPeriod&lt;/FONT&gt; = CALCULATETABLE(VALUES(Sales[CustomerID]),&lt;BR /&gt;FILTER(ALL('Date'[Date]),'Date'[Date]&amp;lt;vCurrentdate),&lt;FONT color="#FF0000"&gt;ALL('Date'[Date])&lt;/FONT&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Return COUNTROWS(EXCEPT(vCustomersThisPeriod,VCustomersPreviousPeriod))&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;SPAN&gt;My question is , why is there a need for the second &lt;FONT color="#FF0000"&gt;ALL('Date'[Date]) &lt;FONT color="#000000"&gt;in &lt;FONT color="#00FF00"&gt;VCustomersPreviousPeriod&lt;/FONT&gt;?&lt;BR /&gt;Doesn't the first filter already accomplish the task?&lt;BR /&gt;Thanks a lot for the answers.&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Aug 2021 08:02:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005093#M44555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T08:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date filters in calculatetable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005706#M44570</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , I usually follow a measure approch &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current = sum(Table[Sales])&lt;/P&gt;
&lt;P&gt;past =&lt;/P&gt;
&lt;P&gt;Var _min = minx(allselected('Date'), Date[Date])&lt;/P&gt;
&lt;P&gt;return&lt;/P&gt;
&lt;P&gt;calculate(sum(Table[Sales]), filter(all('Date'), Date[Date] &amp;lt;_min)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new = countx(values(customer[Customer]), if(not(isblank([Current]))&amp;nbsp; &amp;amp;&amp;amp; isblank([Past]) , [Customer], bank()))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 12:17:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005706#M44570</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-09T12:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date filters in calculatetable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005736#M44571</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt; , thanks a lot for taking the time to answer, but I am not sure it responds to the question i had. In any case, it is much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 12:23:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2005736#M44571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T12:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date filters in calculatetable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2006090#M44587</link>
      <description>&lt;P&gt;Good spot! This ALL(...) is not necessary. It serves no purpose, even though it's not harmful, either. The FILTER overwrites any filter present on the column anyway, so removing any filters via ALL is redundant.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2006090#M44587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple date filters in calculatetable</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2006152#M44590</link>
      <description>&lt;P&gt;Hey daxer, thanks for the explanation!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:57:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-date-filters-in-calculatetable/m-p/2006152#M44590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-09T14:57:17Z</dc:date>
    </item>
  </channel>
</rss>

