<?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: Get the data for previous of MAX month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3298863#M122953</link>
    <description>&lt;P&gt;Hi, there's an error to this dax, "A function 'DATEADD' has been used in a True/False expression that is used as a table filter expression. This is not allowed."&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2023 01:42:26 GMT</pubDate>
    <dc:creator>Velvetine27</dc:creator>
    <dc:date>2023-06-23T01:42:26Z</dc:date>
    <item>
      <title>Get the data for previous of MAX month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3297258#M122878</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for ways to get data for PREVIOUSMONTH if we select multiple months. I just need the data for the previous month of the max selected date. If we select Jan till June, i want the sales data for May, which is the same if I select June only.&lt;BR /&gt;I've tried&amp;nbsp;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([SalesSum]&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;CalendarTable&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CalendarTable&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;, -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;))) but it doesn't work. Appreciate any help here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks !&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:16:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3297258#M122878</guid>
      <dc:creator>Velvetine27</dc:creator>
      <dc:date>2023-06-22T08:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get the data for previous of MAX month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3297336#M122880</link>
      <description>&lt;P&gt;&lt;SPAN&gt;MaxSelectedDate = MAX('Table'[Date])&lt;BR /&gt;PreviousMonthSales = CALCULATE( SUM('Table'[Sales]),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATEADD('Table'[Date], -1, MONTH) = [MaxSelectedDate] )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3297336#M122880</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-22T08:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get the data for previous of MAX month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3298863#M122953</link>
      <description>&lt;P&gt;Hi, there's an error to this dax, "A function 'DATEADD' has been used in a True/False expression that is used as a table filter expression. This is not allowed."&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 01:42:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3298863#M122953</guid>
      <dc:creator>Velvetine27</dc:creator>
      <dc:date>2023-06-23T01:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get the data for previous of MAX month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3299094#M122966</link>
      <description>&lt;P&gt;&lt;SPAN&gt;TRY this once,&amp;nbsp;&lt;BR /&gt;MaxSelectedDate = MAX('Table'[Date])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PreviousMonthSales = CALCULATE( SUM('Table'[Sales]),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DATESINPERIOD('Table[Date],MaxSelectedDate, -1,Month))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 04:21:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3299094#M122966</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-23T04:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get the data for previous of MAX month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3301638#M123177</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472535" data-lia-user-login="Velvetine27" class="lia-mention lia-mention-user"&gt;Velvetine27&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sample data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Month]=MAX('Table'[Month])-1))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;helps, then please consider&amp;nbsp;&lt;EM&gt;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 05:54:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-data-for-previous-of-MAX-month/m-p/3301638#M123177</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2023-06-26T05:54:25Z</dc:date>
    </item>
  </channel>
</rss>

