<?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: Same Month Last Year Value not working for Leap year February in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2374328#M61068</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="327508" data-lia-user-login="gaor" class="lia-mention lia-mention-user"&gt;gaor&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to pull the complete date Field in the table.&lt;BR /&gt;Time Intelligence Function works for whole date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark this as a solution if I anwered your question. Kudos are always appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 07:14:39 GMT</pubDate>
    <dc:creator>Tanushree_Kapse</dc:creator>
    <dc:date>2022-03-04T07:14:39Z</dc:date>
    <item>
      <title>Same Month Last Year Value not working for Leap year February</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2374018#M61050</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am calculating the monthly value and the same month last year (it is a measure). I realized that for 2021 Feb, the same month last year (2020 Feb) was not displaying. I tried DATEADD for -12 MONTH and -1 YEAR. I also tried SAMEPERIODLASTYEAR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to solve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gao&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 03:31:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2374018#M61050</guid>
      <dc:creator>gaor</dc:creator>
      <dc:date>2022-03-04T03:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Same Month Last Year Value not working for Leap year February</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2374328#M61068</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="327508" data-lia-user-login="gaor" class="lia-mention lia-mention-user"&gt;gaor&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to pull the complete date Field in the table.&lt;BR /&gt;Time Intelligence Function works for whole date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark this as a solution if I anwered your question. Kudos are always appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 07:14:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2374328#M61068</guid>
      <dc:creator>Tanushree_Kapse</dc:creator>
      <dc:date>2022-03-04T07:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Same Month Last Year Value not working for Leap year February</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2380148#M61471</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="327508" data-lia-user-login="gaor" class="lia-mention lia-mention-user"&gt;gaor&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please refer to my pbix file to see if it helps you.&lt;/P&gt;
&lt;P&gt;Create a measure and try to use EDATE.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR previous_ =
    EDATE ( MAX ( 'Table'[date] ), -12 )
RETURN
    CALCULATE (
        MAX ( 'Table'[value] ),
        FILTER ( ALL ( 'Table' ), 'Table'[date] = previous_ )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.&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 _ Polly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 03:12:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2380148#M61471</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-08T03:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Same Month Last Year Value not working for Leap year February</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2380718#M61504</link>
      <description>&lt;P&gt;Hi Polly,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help. I have tried your methods. There are slight differences in requirements though. I would like to display the values by month not by date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the left I duplicated your example table value for 2nd day of each month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the right I simply change the 1st day to end of the month.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Neither works expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With your inspiration, I have found the solution, that is, defining the month number and year number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Corrected Measure = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[value]&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;ALL&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;), (&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[date]&lt;/SPAN&gt;&lt;SPAN&gt; ))-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table'[date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[MonthNo]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[date]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;gaor&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 08:44:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Month-Last-Year-Value-not-working-for-Leap-year-February/m-p/2380718#M61504</guid>
      <dc:creator>gaor</dc:creator>
      <dc:date>2022-03-08T08:44:26Z</dc:date>
    </item>
  </channel>
</rss>

