<?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 () issue in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594016#M175926</link>
    <description>&lt;P&gt;Hey everyone ,&lt;BR /&gt;&lt;BR /&gt;I was trying to check the "last year incidents" through Sameperiodlastyear() dax function.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Incidents =&lt;/SPAN&gt; &lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Reported_Incidents&lt;/SPAN&gt;&lt;SPAN&gt;[Incident No]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last_Year_Incidents = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([Total Incidents],&lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;('Date Table'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Getting same year values.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;Verified :&lt;BR /&gt;1. Created a Separate "Date Table" and&amp;nbsp; Marked it as "Date" table.&lt;/P&gt;&lt;P&gt;2. Have 1 to Many Relationship between "Date Table" and "Incidents Table".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Am i missing something here ??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 04 Mar 2025 04:40:49 GMT</pubDate>
    <dc:creator>Prasad_chattu</dc:creator>
    <dc:date>2025-03-04T04:40:49Z</dc:date>
    <item>
      <title>Sameperiodlastyear () issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594016#M175926</link>
      <description>&lt;P&gt;Hey everyone ,&lt;BR /&gt;&lt;BR /&gt;I was trying to check the "last year incidents" through Sameperiodlastyear() dax function.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Incidents =&lt;/SPAN&gt; &lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Reported_Incidents&lt;/SPAN&gt;&lt;SPAN&gt;[Incident No]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last_Year_Incidents = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;([Total Incidents],&lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;('Date Table'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Getting same year values.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;Verified :&lt;BR /&gt;1. Created a Separate "Date Table" and&amp;nbsp; Marked it as "Date" table.&lt;/P&gt;&lt;P&gt;2. Have 1 to Many Relationship between "Date Table" and "Incidents Table".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Am i missing something here ??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Mar 2025 04:40:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594016#M175926</guid>
      <dc:creator>Prasad_chattu</dc:creator>
      <dc:date>2025-03-04T04:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sameperiodlastyear () issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594029#M175927</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1232044" data-lia-user-login="Prasad_chattu" class="lia-mention lia-mention-user"&gt;Prasad_chattu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure that the Year column used in the visual is 'Date Table'[Year].&lt;/P&gt;
&lt;P&gt;Based on the measure values in the screenshot, it appears that the Year column may be from Reported_Incidents or another table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 04:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594029#M175927</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2025-03-04T04:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sameperiodlastyear () issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594042#M175928</link>
      <description>&lt;P&gt;Yes its fixed. Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 05:04:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sameperiodlastyear-issue/m-p/4594042#M175928</guid>
      <dc:creator>Prasad_chattu</dc:creator>
      <dc:date>2025-03-04T05:04:19Z</dc:date>
    </item>
  </channel>
</rss>

