<?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: Urgent assistance: Calculate the moving average of a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3062010#M105841</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170780" data-lia-user-login="JDU" class="lia-mention lia-mention-user"&gt;JDU&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems not difficult. could you paste your sample dataset, ideally in EN?&lt;/P&gt;</description>
    <pubDate>Sun, 05 Feb 2023 03:18:18 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-02-05T03:18:18Z</dc:date>
    <item>
      <title>Urgent assistance: Calculate the moving average of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061542#M105816</link>
      <description>&lt;P&gt;Dear friends, I would like to ask for your kind assistance in solving the following problem:&lt;/P&gt;&lt;P&gt;The last column of the following image is the monthly average of each month calculated from the DAX Average measure (column 3/column 4).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And what I need to do is to get the quarterly and semi-annual moving average of that measure (last column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example: (366+349+328)/3 = 347.6 ; (349+328+362)/3 = 343.3 and so on (idem with semester)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and (366+349+328+362+339+345)/6&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried some solutions with SUMX and DATEINSPIRIOD but it always gives me a wrong number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 15:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061542#M105816</guid>
      <dc:creator>JDU</dc:creator>
      <dc:date>2023-02-04T15:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent assistance: Calculate the moving average of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061544#M105818</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170780" data-lia-user-login="JDU" class="lia-mention lia-mention-user"&gt;JDU&lt;/a&gt;&amp;nbsp;See if this helps:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Better-Rolling-Average/m-p/2897874#M911" target="_blank"&gt;Better Rolling Average - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;div data-video-id="https://youtu.be/TkrHfRFjpSc" data-video-remote-vid="https://youtu.be/TkrHfRFjpSc" class="lia-video-container lia-media-is-center lia-media-size-medium"&gt;&lt;iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTkrHfRFjpSc%3Ffeature%3Doembed&amp;amp;display_name=YouTube&amp;amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTkrHfRFjpSc&amp;amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTkrHfRFjpSc%2Fhqdefault.jpg&amp;amp;type=text%2Fhtml&amp;amp;schema=youtube" allowfullscreen="" style="max-width: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 15:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061544#M105818</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-02-04T15:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent assistance: Calculate the moving average of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061693#M105827</link>
      <description>&lt;P&gt;Thank you very much Greg for your collaboration, I did not know that solution, very useful, however, the result is not the expected one, it is very close but not correct.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 18:52:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3061693#M105827</guid>
      <dc:creator>JDU</dc:creator>
      <dc:date>2023-02-04T18:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent assistance: Calculate the moving average of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3062010#M105841</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170780" data-lia-user-login="JDU" class="lia-mention lia-mention-user"&gt;JDU&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems not difficult. could you paste your sample dataset, ideally in EN?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 03:18:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3062010#M105841</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-05T03:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent assistance: Calculate the moving average of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3062820#M105929</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="170780" data-lia-user-login="JDU" class="lia-mention lia-mention-user"&gt;JDU&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can refer to the following example.&lt;/P&gt;
&lt;P&gt;The sample data table&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;And The Average has been created in the table&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create two measures in table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;quarterly = 
var _filter=FILTER(ALLSELECTED('Table'),EOMONTH('Table'[Date],0)&amp;lt;=EOMONTH(MAX('Table'[Date]),0))
var _top3=TOPN(3,_filter,[Date],DESC)
return DIVIDE(SUMX(_top3,ROUND([Average],0)),3)

semi-annual = 
var _filter=FILTER(ALLSELECTED('Table'),EOMONTH('Table'[Date],0)&amp;lt;=EOMONTH(MAX('Table'[Date]),0))
var _top6=TOPN(6,_filter,[Date],DESC)
return DIVIDE(SUMX(_top6,ROUND([Average],0)),6)&lt;/LI-CODE&gt;
&lt;P&gt;Output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 02:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Urgent-assistance-Calculate-the-moving-average-of-a-measure/m-p/3062820#M105929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-06T02:54:17Z</dc:date>
    </item>
  </channel>
</rss>

