<?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: Bug Report: DATESINPERIOD Function – Leap Year Handling in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618537#M176752</link>
    <description>&lt;P&gt;A workaround was to propose a month-year selector instead of the date field. This way, you don’t have any issues. I’m reporting the measure for completeness.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var &lt;SPAN&gt;_ultimodelmese =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;MAX('Data'[data]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ALLEXCEPT('Data', 'Data'[anno], 'Data'[mese_anno])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;[Amount],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;DATESINPERIOD(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Data'[data],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;_ultimodelmese,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;SPAN&gt;1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 15:53:43 GMT</pubDate>
    <dc:creator>Mattiar</dc:creator>
    <dc:date>2025-03-20T15:53:43Z</dc:date>
    <item>
      <title>Bug Report: DATESINPERIOD Function – Leap Year Handling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618291#M176738</link>
      <description>&lt;P&gt;I’d like to report a bug in the DATESINPERIOD function:&lt;/P&gt;&lt;P&gt;DATESINPERIOD (&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Data'[data],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECTEDVALUE ( 'Data'[data] ),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;YEAR&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;When I select the exact date of February 28, 2025, it should go back to February 29, 2024, as stated in the documentation, but it doesn’t handle the leap year day properly.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This could lead to misunderstandings in reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 13:34:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618291#M176738</guid>
      <dc:creator>Mattiar</dc:creator>
      <dc:date>2025-03-20T13:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bug Report: DATESINPERIOD Function – Leap Year Handling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618326#M176740</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="385813" data-lia-user-login="Mattiar" class="lia-mention lia-mention-user"&gt;Mattiar&lt;/a&gt;&amp;nbsp;Yeah, in general, stay away from the DAX TI functions IMHO.&amp;nbsp;You may find this helpful - &lt;A href="https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:00:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618326#M176740</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2025-03-20T14:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bug Report: DATESINPERIOD Function – Leap Year Handling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618330#M176741</link>
      <description>&lt;P&gt;Thanks, Greg,&lt;BR /&gt;your links are always relevant.&lt;BR /&gt;"Unfortunately," I share your opinion about the TI functions, but at the same time, I hope they will be improved and cleaned of their bugs over time.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:05:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618330#M176741</guid>
      <dc:creator>Mattiar</dc:creator>
      <dc:date>2025-03-20T14:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Bug Report: DATESINPERIOD Function – Leap Year Handling</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618537#M176752</link>
      <description>&lt;P&gt;A workaround was to propose a month-year selector instead of the date field. This way, you don’t have any issues. I’m reporting the measure for completeness.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var &lt;SPAN&gt;_ultimodelmese =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;MAX('Data'[data]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;ALLEXCEPT('Data', 'Data'[anno], 'Data'[mese_anno])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;[Amount],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;DATESINPERIOD(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Data'[data],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;_ultimodelmese,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;SPAN&gt;1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;YEAR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 15:53:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-Report-DATESINPERIOD-Function-Leap-Year-Handling/m-p/4618537#M176752</guid>
      <dc:creator>Mattiar</dc:creator>
      <dc:date>2025-03-20T15:53:43Z</dc:date>
    </item>
  </channel>
</rss>

