<?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: 3 Month Rolling Average Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3077025#M107024</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;BR /&gt;Measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling Avg 3M = 
Var _N1=SUMMARIZE(FILTER(ALL('Table'),[Date]&amp;lt;=SELECTEDVALUE('Table'[Date])),[Date],"Sum",SUM('Table'[Value]))
Var _N2=TOPN(3,_N1,[Date],DESC)
Return
DIVIDE(SUMX(_N2,[Sum]),COUNTROWS(_N2))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&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 _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 05:56:35 GMT</pubDate>
    <dc:creator>v-zhangti</dc:creator>
    <dc:date>2023-02-13T05:56:35Z</dc:date>
    <item>
      <title>3 Month Rolling Average Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3070902#M106577</link>
      <description>&lt;P&gt;Hello looking for help adding a rolling 3-month average to the below table in power bi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dummy values in the Rolling Avg 3M column im attempting to populate via a measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the retention rate (rr) is 50 for feb as seen below, so the Rolling Average should show 50.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next month march is 60, so the Rolling Average should show 50+60/2 = 55&lt;/P&gt;&lt;P&gt;Then apr which is 70,&amp;nbsp; so the Rolling Average should show 50+60+70/2 = 60&lt;/P&gt;&lt;P&gt;Once we move into May, then the rolling average should do March/Apr/May, and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;table name rrate&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 05:18:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3070902#M106577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-09T05:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Average Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3077025#M107024</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;BR /&gt;Measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling Avg 3M = 
Var _N1=SUMMARIZE(FILTER(ALL('Table'),[Date]&amp;lt;=SELECTEDVALUE('Table'[Date])),[Date],"Sum",SUM('Table'[Value]))
Var _N2=TOPN(3,_N1,[Date],DESC)
Return
DIVIDE(SUMX(_N2,[Sum]),COUNTROWS(_N2))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the result you expect?&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 _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 05:56:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3077025#M107024</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2023-02-13T05:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Average Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3078693#M107156</link>
      <description>&lt;P&gt;Looks great&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="332147" data-lia-user-login="v-zhangti" class="lia-mention lia-mention-user"&gt;v-zhangti&lt;/a&gt;&amp;nbsp;Thank you for taking the time to help, its much appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 02:45:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Average-Measure/m-p/3078693#M107156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-14T02:45:57Z</dc:date>
    </item>
  </channel>
</rss>

