<?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: Dynamically calculate the previous 3 months average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-calculate-the-previous-3-months-average/m-p/722551#M1428</link>
    <description>&lt;P&gt;Hi JWick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My advise would be to incorporate a date calendar into the report. I personally use the one created by Avi Singh which can be downloaded at&amp;nbsp;&lt;A href="http://www.learnpowerbi.com/bonus-download" target="_self"&gt;&lt;FONT&gt;http://www.learnpowerbi.com/bonus-download&lt;/FONT&gt;&lt;/A&gt; (You need to sign up to his newsletter first).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can view his youtube channel for a tutorial on how he builds the calendar but it will help you as it dynamically updates based on the present date. Using the month offset in his calendar you could then filter you sum to previous months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. your measure would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;prev 3 month avg consume =&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; (Usual Sum) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Filtering only for the past 3 months, this month excluded)&lt;/P&gt;&lt;P&gt;CALCULATE(*YOUR CALCULATION*, AND(Calendar[monthOffset] &amp;lt; 0 , Calendar[monthOffset] &amp;gt; -4))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 12:52:52 GMT</pubDate>
    <dc:creator>C-G-Davidson</dc:creator>
    <dc:date>2019-06-24T12:52:52Z</dc:date>
    <item>
      <title>Dynamically calculate the previous 3 months average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-calculate-the-previous-3-months-average/m-p/721008#M1394</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im trying to create a column that shows the previous 3 months avg. consume forecasted&amp;nbsp; dynamically. Basically the first 3 months doesnt have the average. This will start the calculation in the month of 5/1/2019, will get the previous average of consume% from (2/1/2019,3/1/2019, 4/1/2019) exclude the current month. same with 6/1/2019,&amp;nbsp;will get the previous average of consume% from (3/1/2019,4/1/2019, 5/1/2019) exclude the current month. After getting the average will calculate now the consume forecasted, the formula would be :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(balance% * prev 3 month avg of consume%) +consume%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex for 5/1/2019&amp;nbsp; &amp;nbsp; (0.10%*70.20%) +70.86&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 73.93%&amp;nbsp; consume frcst&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6/1/2019&amp;nbsp; &amp;nbsp; (9.73%*72.30%) +60.94&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 67.98%&amp;nbsp; consume frcst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DT	        Received	consume	inprocess	consume%	balance%	prev3monthsavg (consume Forecasted%)
2/1/2019	79606	        51384	0	        64.55%	         0.00%	          
3/1/2019	84194	        61211	0	        72.70%	         0.00%	          0%
4/1/2019	92458	        67807	0	        73.34%	         0.00%	          0%
5/1/2019	94531	        66988	95	        70.86%	         0.10%	          73.93%
6/1/2019	29832	       18181	2903	        60.94%	         9.73%	          67.98%&lt;BR /&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;By the way, I'm new to this forum and DAX fumctionality. Thank you in Advance.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 07:12:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-calculate-the-previous-3-months-average/m-p/721008#M1394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-21T07:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically calculate the previous 3 months average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-calculate-the-previous-3-months-average/m-p/722551#M1428</link>
      <description>&lt;P&gt;Hi JWick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My advise would be to incorporate a date calendar into the report. I personally use the one created by Avi Singh which can be downloaded at&amp;nbsp;&lt;A href="http://www.learnpowerbi.com/bonus-download" target="_self"&gt;&lt;FONT&gt;http://www.learnpowerbi.com/bonus-download&lt;/FONT&gt;&lt;/A&gt; (You need to sign up to his newsletter first).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can view his youtube channel for a tutorial on how he builds the calendar but it will help you as it dynamically updates based on the present date. Using the month offset in his calendar you could then filter you sum to previous months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. your measure would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;prev 3 month avg consume =&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; (Usual Sum) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Filtering only for the past 3 months, this month excluded)&lt;/P&gt;&lt;P&gt;CALCULATE(*YOUR CALCULATION*, AND(Calendar[monthOffset] &amp;lt; 0 , Calendar[monthOffset] &amp;gt; -4))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 12:52:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamically-calculate-the-previous-3-months-average/m-p/722551#M1428</guid>
      <dc:creator>C-G-Davidson</dc:creator>
      <dc:date>2019-06-24T12:52:52Z</dc:date>
    </item>
  </channel>
</rss>

