<?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: Help with SAMEPERIODLASTYEAR in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000824#M101287</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494036" data-lia-user-login="Data_Tim" class="lia-mention lia-mention-user"&gt;Data_Tim&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;Tickets LYTD =
CALCULATE (
    COUNT ( 'All Tickets'[sys_id] ),
    FILTER ( SAMEPERIODLASTYEAR ( DateTable[Date] ), DateTable[Check] = "True" )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2023 11:22:14 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-01-04T11:22:14Z</dc:date>
    <item>
      <title>Help with SAMEPERIODLASTYEAR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000804#M101284</link>
      <description>&lt;P&gt;Happy new year all!&lt;/P&gt;&lt;P&gt;I am trying to use the SAMPERIODLASTYEAR function to count records from the previous year, so that I can compare them to the number of records for the current year (up until today's date). The problem I am running into is that the same day last year is counting records for the entire month, rather than just that corresponding day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a field in my Date table [check] which checks the day number of the year so future days in the same month can be filtered out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help to resolve this would be greatly appreciated. Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 11:07:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000804#M101284</guid>
      <dc:creator>Data_Tim</dc:creator>
      <dc:date>2023-01-04T11:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAMEPERIODLASTYEAR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000824#M101287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494036" data-lia-user-login="Data_Tim" class="lia-mention lia-mention-user"&gt;Data_Tim&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;Tickets LYTD =
CALCULATE (
    COUNT ( 'All Tickets'[sys_id] ),
    FILTER ( SAMEPERIODLASTYEAR ( DateTable[Date] ), DateTable[Check] = "True" )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 11:22:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000824#M101287</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-04T11:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAMEPERIODLASTYEAR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000868#M101293</link>
      <description>&lt;P&gt;Thanks for getting back to me&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Unfortunately that doesn't work as the Filter is expecting to evaluate DateTable[Date] not DateTable[Check]&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 11:47:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000868#M101293</guid>
      <dc:creator>Data_Tim</dc:creator>
      <dc:date>2023-01-04T11:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAMEPERIODLASTYEAR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000891#M101294</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494036" data-lia-user-login="Data_Tim" class="lia-mention lia-mention-user"&gt;Data_Tim&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Appologies for that. Yes you are right this was supposed to be CALCULATETABLE&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Tickets LYTD =
CALCULATE (
    COUNT ( 'All Tickets'[sys_id] ),
    CALCULATETABLE (
        SAMEPERIODLASTYEAR ( DateTable[Date] ),
        DateTable[Check] = "True"
    )
)

Or 

Tickets LYTD =
CALCULATE (
    COUNT ( 'All Tickets'[sys_id] ),
    SAMEPERIODLASTYEAR ( DateTable[Date] ),
    FILTER ( ALL ( DateTable ), DateTable[Check] = "True" )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Jan 2023 11:55:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000891#M101294</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-04T11:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAMEPERIODLASTYEAR</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000914#M101295</link>
      <description>&lt;P&gt;That's worked for me - thanks for your help&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;. Much appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 12:11:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-SAMEPERIODLASTYEAR/m-p/3000914#M101295</guid>
      <dc:creator>Data_Tim</dc:creator>
      <dc:date>2023-01-04T12:11:50Z</dc:date>
    </item>
  </channel>
</rss>

