<?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 SAMEPERIODLASTYEAR not working. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218298#M117546</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trying to create a DAX command using this function.&lt;/P&gt;&lt;P&gt;My data is as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The Month column is formatted as Date.&lt;/P&gt;&lt;P&gt;If I take out the&amp;nbsp;SAMEPERIODLASTYEAR element it returns the value for the current month OK. But as soon as I add in&amp;nbsp;SAMEPERIODLASTYEAR it returns a blank field.&lt;/P&gt;&lt;P&gt;Can anybody see what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 16:02:30 GMT</pubDate>
    <dc:creator>Fusilier</dc:creator>
    <dc:date>2023-05-03T16:02:30Z</dc:date>
    <item>
      <title>SAMEPERIODLASTYEAR not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218298#M117546</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Trying to create a DAX command using this function.&lt;/P&gt;&lt;P&gt;My data is as follows:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The Month column is formatted as Date.&lt;/P&gt;&lt;P&gt;If I take out the&amp;nbsp;SAMEPERIODLASTYEAR element it returns the value for the current month OK. But as soon as I add in&amp;nbsp;SAMEPERIODLASTYEAR it returns a blank field.&lt;/P&gt;&lt;P&gt;Can anybody see what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 16:02:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218298#M117546</guid>
      <dc:creator>Fusilier</dc:creator>
      <dc:date>2023-05-03T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218396#M117556</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="552590" data-lia-user-login="Fusilier" class="lia-mention lia-mention-user"&gt;Fusilier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Prev Year = 
CALCULATE(
    SUM(data[Incident]),
    FILTER(
        ALL(data),
        data[month]=EDATE(EARLIER(data[Month]), -12)
    ),
    ALLEXCEPT(data, data[Location])
)&lt;/LI-CODE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Prev Year2 = 
SUMX(
    FILTER(
        data,
        data[month]=EDATE(EARLIER(data[month]), -12)
            &amp;amp;&amp;amp;data[location]=EARLIER(data[location])
    ),
    data[Incident]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 17:10:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218396#M117556</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-03T17:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIODLASTYEAR not working.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218514#M117565</link>
      <description>&lt;P&gt;Apologies, my fault. Solution 2 works like a dream!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANK YOU!&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 18:29:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIODLASTYEAR-not-working/m-p/3218514#M117565</guid>
      <dc:creator>Fusilier</dc:creator>
      <dc:date>2023-05-03T18:29:57Z</dc:date>
    </item>
  </channel>
</rss>

