<?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 Datesinperiod not working as expected? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780539#M4113</link>
    <description>&lt;P&gt;Why would 1 day in the same month suddenly remove a full month from below measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Rolling PTLIQ = 
CALCULATE(SUM('NetSuite_P&amp;amp;L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date],
                        LASTDATE(DateDimension[Date]),-1,Year
                       )
         )&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also side note, if anybody knows how to make this divide by number of entries correctly that would be appreciated, right now i'm just dividing the total by 12 in another measure. it's dirty but I needed to get it working :(&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2019 02:13:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-31T02:13:39Z</dc:date>
    <item>
      <title>Datesinperiod not working as expected?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780539#M4113</link>
      <description>&lt;P&gt;Why would 1 day in the same month suddenly remove a full month from below measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Rolling PTLIQ = 
CALCULATE(SUM('NetSuite_P&amp;amp;L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date],
                        LASTDATE(DateDimension[Date]),-1,Year
                       )
         )&lt;/PRE&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also side note, if anybody knows how to make this divide by number of entries correctly that would be appreciated, right now i'm just dividing the total by 12 in another measure. it's dirty but I needed to get it working :(&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 02:13:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780539#M4113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-31T02:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Datesinperiod not working as expected?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780783#M4119</link>
      <description>&lt;P&gt;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>Sun, 01 Sep 2019 12:03:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780783#M4119</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-09-01T12:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Datesinperiod not working as expected?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780900#M4126</link>
      <description>&lt;P&gt;Hey Greg, your code was a little too much for me. I went with something simpler that seems to give me the results I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;Rolling PTLIQ = 

CALCULATE(SUM('NetSuite_P&amp;amp;L_Monthly'[Monthly PTLIQ]), DATESINPERIOD(DateDimension[Date],
                        LASTDATE(PREVIOUSDAY(PREVIOUSMONTH(DateDimension[Date]))),-1,Year
                       )
         )&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 01 Sep 2019 22:37:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-expected/m-p/780900#M4126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-01T22:37:54Z</dc:date>
    </item>
  </channel>
</rss>

