<?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 intended in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444107#M65546</link>
    <description>&lt;P&gt;Hi, I am having issues I suspect is related to the Datesinperiod function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;The visual on the left is showing number of clicks by month by Contact ID&lt;/P&gt;&lt;P&gt;The visual on the right shows the number of clicks in the last 3 months (not including current month) and is calculated as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Clicks L3 = 
    CALCULATE(
        GS_WEBMETRICS_CLICK_MONTH[Number of Clicks],
        DATESINPERIOD(
            GS_WEBMETRICS_CLICK_MONTH[CLICK_MONTH],
            MAX(GS_WEBMETRICS_CLICK_MONTH[CLICK_MONTH])-1,
            -3,
            MONTH
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the totals seem to add up correctly to 1.365m, you'll notice that the visual on the right is not displaying all contacts&lt;/P&gt;&lt;P&gt;For instance, contacts 1, 29, and 35 are in the visual on the left, but absent from the one on the right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on how to modify the date logic such that the right visual shows all contacts where [Clicks L3] &amp;gt;0 show up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 17:15:45 GMT</pubDate>
    <dc:creator>rjiang</dc:creator>
    <dc:date>2022-04-07T17:15:45Z</dc:date>
    <item>
      <title>Datesinperiod not working as intended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444107#M65546</link>
      <description>&lt;P&gt;Hi, I am having issues I suspect is related to the Datesinperiod function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;The visual on the left is showing number of clicks by month by Contact ID&lt;/P&gt;&lt;P&gt;The visual on the right shows the number of clicks in the last 3 months (not including current month) and is calculated as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Clicks L3 = 
    CALCULATE(
        GS_WEBMETRICS_CLICK_MONTH[Number of Clicks],
        DATESINPERIOD(
            GS_WEBMETRICS_CLICK_MONTH[CLICK_MONTH],
            MAX(GS_WEBMETRICS_CLICK_MONTH[CLICK_MONTH])-1,
            -3,
            MONTH
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the totals seem to add up correctly to 1.365m, you'll notice that the visual on the right is not displaying all contacts&lt;/P&gt;&lt;P&gt;For instance, contacts 1, 29, and 35 are in the visual on the left, but absent from the one on the right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on how to modify the date logic such that the right visual shows all contacts where [Clicks L3] &amp;gt;0 show up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 17:15:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444107#M65546</guid>
      <dc:creator>rjiang</dc:creator>
      <dc:date>2022-04-07T17:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Datesinperiod not working as intended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444634#M65574</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="322216" data-lia-user-login="rjiang" class="lia-mention lia-mention-user"&gt;rjiang&lt;/a&gt; , Please prefer to use date table marked as date tbale in such cases&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Clicks L3 = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;GS_WEBMETRICS_CLICK_MONTH[Number of Clicks],&lt;BR /&gt;DATESINPERIOD(&lt;BR /&gt;Date[Date],&lt;BR /&gt;MAX(Date[Date])-1,&lt;BR /&gt;-3,&lt;BR /&gt;MONTH&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rolling Months Formula: &lt;A href="https://youtu.be/GS5O4G81fww" target="_blank"&gt;https://youtu.be/GS5O4G81fww&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 01:55:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444634#M65574</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-04-08T01:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Datesinperiod not working as intended</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444847#M65584</link>
      <description>&lt;P&gt;I forgot to mention the data is coming in from direct query, so I can't create a functioning date table to filter form&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 04:00:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Datesinperiod-not-working-as-intended/m-p/2444847#M65584</guid>
      <dc:creator>rjiang</dc:creator>
      <dc:date>2022-04-08T04:00:10Z</dc:date>
    </item>
  </channel>
</rss>

