<?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: How to do projections for averages based off previous months for future months? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263840#M54799</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could have a measure like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Projections = 
IF(ISBLANK([Actuals :]),
    CALCULATE(
        AVERAGEX(
            VALUES('Calendar'[Year]),
            [Actuals :]
        ),
        REMOVEFILTERS('Calendar'),
        VALUES('Calendar'[Month])
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 03 Jan 2022 16:31:14 GMT</pubDate>
    <dc:creator>PaulOlding</dc:creator>
    <dc:date>2022-01-03T16:31:14Z</dc:date>
    <item>
      <title>How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263712#M54789</link>
      <description>&lt;P&gt;What I am trying to accomplish is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing projections for months that have not occured by using the past averages of those months like the following:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In this picutre the projected december average is all the previous December average's and January is previous January etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the following tables and calculations I created&amp;nbsp;&lt;/P&gt;&lt;P&gt;'Actuals :'&lt;/P&gt;&lt;P&gt;'Calendar'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I also need as well is if there is a number in there for the actuals already than it is blank.&amp;nbsp; I have the following formula thus far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Actual Projections (12 MA) = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Actuals :]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; Blank&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;Averagex&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Test Calendar'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Test Calendar'[Date]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Actuals :]&lt;/SPAN&gt;&lt;SPAN&gt; ) ))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But this is a moving average as Time currently stands&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any advice????&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 15:02:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263712#M54789</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T15:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263804#M54795</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Something like this should work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Forecast = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Average'[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;/STRONG&gt;&lt;img /&gt;&lt;P&gt;I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:11:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263804#M54795</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-03T16:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263840#M54799</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could have a measure like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Projections = 
IF(ISBLANK([Actuals :]),
    CALCULATE(
        AVERAGEX(
            VALUES('Calendar'[Year]),
            [Actuals :]
        ),
        REMOVEFILTERS('Calendar'),
        VALUES('Calendar'[Month])
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:31:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263840#M54799</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-01-03T16:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263949#M54806</link>
      <description>&lt;P&gt;Here is how I have it written I am having trouble getting it to translate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Forecast = &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(&lt;/SPAN&gt;&lt;SPAN&gt;'GL298I'[POSTING-DATE-2]&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;month&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'GL298I'[POSTING-DATE-2]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The difference is a specific date under the data set with the&amp;nbsp; table that displays like:&amp;nbsp;*Wednesday, March 14, 2001 (Long Date).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I am still getting zero under as forcasting: mm&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice the first submission did not work.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jan 2022 17:54:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2263949#M54806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T17:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264106#M54810</link>
      <description>&lt;P&gt;Actually I am idiot this is working, but one quick question.&amp;nbsp; Where do I need to put the sum feature so it sums total like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 19:11:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264106#M54810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T19:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264221#M54811</link>
      <description>&lt;P&gt;Do you mean having a projection value on the grant total line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, the first problem is the if condition used so far: ISBLANK([Actuals :]).&amp;nbsp; this stops the measure returning a value for the Total row.&lt;/P&gt;
&lt;P&gt;Next, for a SUM to work we'll need to iterate a table of years and months for which we want a projection.&lt;/P&gt;
&lt;P&gt;I've split this into 2 measures, but you could combine them if you wish.&lt;/P&gt;
&lt;P&gt;First the measure used before, but removing the IF condition&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Monthly Projection = 
CALCULATE(
    AVERAGEX(
        VALUES('Calendar'[Year]),
        [Actuals :]
    ),
    REMOVEFILTERS('Calendar'),
    VALUES('Calendar'[Month])
)&lt;/LI-CODE&gt;
&lt;P&gt;Then the measure that assumes we want a projection for months later than the last actuals amount.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Projections = 
VAR _MaxActualDate = CALCULATE(EOMONTH(MAX(Actuals[Date]), 0), REMOVEFILTERS())
VAR _CurrentDate = MAX('Calendar'[Date])
VAR _Result = 
    CALCULATE(
        SUMX(
            SUMMARIZE('Calendar','Calendar'[Year],'Calendar'[Month]),
            [Monthly Projection]
        ),
        KEEPFILTERS(DATESBETWEEN('Calendar'[Date], _MaxActualDate +1, _CurrentDate))
    )
RETURN
    _Result&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 20:10:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264221#M54811</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-01-03T20:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264322#M54812</link>
      <description>&lt;P&gt;Question on second part of your formula:&amp;nbsp; On the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR _MaxActualDate = CALCULATE(EOMONTH(MAX&lt;STRONG&gt;(Actuals[Date])&lt;/STRONG&gt;, 0), REMOVEFILTERS())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a calculated field of actuals and a calendar table to where they are on seperate tables to where I do not have a actulas[date] column identifier.&amp;nbsp; What actuallly needs to go here?&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 21:20:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264322#M54812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-03T21:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264974#M54836</link>
      <description>&lt;P&gt;Actuals[Date] is the column in your amounts table used in the relationship to the calendar table&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 07:54:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2264974#M54836</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-01-04T07:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to do projections for averages based off previous months for future months?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2265736#M54889</link>
      <description>&lt;P&gt;Thanks I believe I figured it out had to switch some references around.&amp;nbsp; Thanks I will mark as solution once i am 100% sure.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 15:11:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-do-projections-for-averages-based-off-previous-months-for/m-p/2265736#M54889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T15:11:16Z</dc:date>
    </item>
  </channel>
</rss>

