<?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: Rolling Last 3 Months Using Dates In Period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365603#M24782</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp; Thanks alot.&amp;nbsp; I looked at the source data which is ficticious data that I was testing with and saw that you were right, there are multiple days of data.&amp;nbsp; My visual was aggregating by total sales amount.&amp;nbsp; As far as the variable "amount" goes, is it standard to use that in all summarize functions?&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2020 21:25:52 GMT</pubDate>
    <dc:creator>sfalk781</dc:creator>
    <dc:date>2020-09-11T21:25:52Z</dc:date>
    <item>
      <title>Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365533#M24777</link>
      <description>&lt;P&gt;Hey everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Dates in Period to look back to get the average of 3 days sales.&amp;nbsp; The measure looks correct to me but the numbers aren't adding up to the right amount.&amp;nbsp; In fact, if I change Average to Sum, it works perfect. Can anyone tell me, with the images provided, why the averages are off?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Moving X Months Avg = CALCULATE(AVERAGE(FactInternetSales21[SalesAmount]),DATESINPERIOD(FactInternetSales21[OrderDate],LASTDATE(FactInternetSales21[OrderDate]),-3,day))&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 20:18:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365533#M24777</guid>
      <dc:creator>sfalk781</dc:creator>
      <dc:date>2020-09-11T20:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365568#M24778</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227843" data-lia-user-login="sfalk781" class="lia-mention lia-mention-user"&gt;sfalk781&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your granularity of the&amp;nbsp;FactInternetSales21 table is not at day level, there are multiple records per dates. You need to summarize. to get the correct average&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Moving X Months Avg = 

CALCULATE(
    AVERAGEX(
        SUMMARIZE(
            FactInternetSales21,
            FactInternetSales21[Order Date],
            "Amount",SUM(FactInternetSales21[Sales Amount])),
            [Amount]   
        ),
    DATESINPERIOD(
        FactInternetSales21[Order Date],
        LASTDATE(FactInternetSales21[Order Date]),-3,day)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 20:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365568#M24778</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-09-11T20:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365585#M24779</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;thanks for your help.&amp;nbsp; I applied the new measure and it works, but I can't really understand what you're saying.&amp;nbsp; You mentioned that it's not at the "Day" level and there are "multiple" records per dates.&amp;nbsp; In the image I provided, each row is a separate date (day) and I only see a single record for each date.&lt;/P&gt;&lt;P&gt;Can you help explain what I'm missing here?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 20:55:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365585#M24779</guid>
      <dc:creator>sfalk781</dc:creator>
      <dc:date>2020-09-11T20:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365588#M24780</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp; I also wanted to ask, in your formulary, what is actually happening with "amount".&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 21:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365588#M24780</guid>
      <dc:creator>sfalk781</dc:creator>
      <dc:date>2020-09-11T21:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365596#M24781</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227843" data-lia-user-login="sfalk781" class="lia-mention lia-mention-user"&gt;sfalk781&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What you showed me was the table visual, can you look at the source data in your table?&lt;BR /&gt;&lt;BR /&gt;the formula basically summarizes the table by date and aggregates the value by date, I assigned the total value to a variable called "Amount" which eventually gets averaged.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 21:11:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365596#M24781</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-09-11T21:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365603#M24782</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp; Thanks alot.&amp;nbsp; I looked at the source data which is ficticious data that I was testing with and saw that you were right, there are multiple days of data.&amp;nbsp; My visual was aggregating by total sales amount.&amp;nbsp; As far as the variable "amount" goes, is it standard to use that in all summarize functions?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2020 21:25:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365603#M24782</guid>
      <dc:creator>sfalk781</dc:creator>
      <dc:date>2020-09-11T21:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Last 3 Months Using Dates In Period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365885#M24784</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227843" data-lia-user-login="sfalk781" class="lia-mention lia-mention-user"&gt;sfalk781&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use SUMMARIIZE column(s) to create a virtual table, it is optional to add an aggegation column along with it like I did with a variable AMOUNT. &amp;nbsp;You can use any name for it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;please refer support documents for further understanding&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Sep 2020 03:08:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Rolling-Last-3-Months-Using-Dates-In-Period/m-p/1365885#M24784</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-09-12T03:08:26Z</dc:date>
    </item>
  </channel>
</rss>

