<?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: Spread Forecast Based on Monthly Seasonal % - measure almost complete! in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285300#M56021</link>
    <description>&lt;P&gt;Hi Alexis Olson:&lt;/P&gt;&lt;P&gt;Thanks very much for your work on this measure. It's providing results for Sept-Nov but December is blank. The results appear to be inflated. I will attempt to paste in the expected results and the steps the measure is trying to cover. This definitely got it a step closer and would appreicate if you could take another look. Your meassge is in the matrix all the way to the right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Jan 2022 15:26:25 GMT</pubDate>
    <dc:creator>Whitewater100</dc:creator>
    <dc:date>2022-01-16T15:26:25Z</dc:date>
    <item>
      <title>Spread Forecast Based on Monthly Seasonal % - measure almost complete!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2284307#M55975</link>
      <description>&lt;P&gt;&lt;A title="Forecast allocation question" href="https://drive.google.com/file/d/1z8pCrviT1rYXk9bLrw9aML0OmaBqMdtk/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1z8pCrviT1rYXk9bLrw9aML0OmaBqMdtk/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear Community:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the &lt;STRONG&gt;last part&lt;/STRONG&gt; of a DAX forumla to work dynamically.&amp;nbsp; In this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Revised Forecast = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;SumBal&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;filter&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Dates[MonthOfYear]&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;STRONG&gt;9,10,11,12&lt;/STRONG&gt;&lt;SPAN&gt;}),&lt;/SPAN&gt;&lt;SPAN&gt;Dates[MonthOfYear]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Seasonal Bal"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Seasonal Bal % Mix]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[Seasonal Bal]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;Remainder&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;[Remaining FCast]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;Final&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;divide&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Remaining FCast]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;[Seasonal Bal % Mix]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;sumbal&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;return&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;[Seasonal Bal % Mix]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;blank&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;Final&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;I want to have the remaining months seasonal percents&amp;nbsp; added together dynamically. They are hard coded above in {9,10,11,12}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;becasue we have actual results thru August(MO #8).&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have provided a link to the file. This mesure is currently giving the correct answer but is only good if results are through August.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance for any assist on this one!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jan 2022 18:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2284307#M55975</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-01-14T18:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Spread Forecast Based on Monthly Seasonal % - measure almost complete!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2284364#M55980</link>
      <description>&lt;P&gt;You could use a variable like this:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Revised Forecast =
VAR CurrMonth = MAX ( Dates[MonthOfYear] )
VAR SumBal =
    SUMX (
        SUMMARIZE (
            FILTER ( ALLSELECTED ( Dates ), Dates[MonthOfYear] &amp;gt; CurrMonth ),
            Dates[MonthOfYear],
            "Seasonal Bal", [Seasonal Bal % Mix]
        ),
        [Seasonal Bal]
    )
VAR Remainder = [Remaining FCast]
VAR Final =
    DIVIDE ( [Remaining FCast] * [Seasonal Bal % Mix], sumbal )
RETURN
    IF ( ISBLANK ( [Seasonal Bal % Mix] ), BLANK (), Final )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 14 Jan 2022 20:00:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2284364#M55980</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-01-14T20:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Spread Forecast Based on Monthly Seasonal % - measure almost complete!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285300#M56021</link>
      <description>&lt;P&gt;Hi Alexis Olson:&lt;/P&gt;&lt;P&gt;Thanks very much for your work on this measure. It's providing results for Sept-Nov but December is blank. The results appear to be inflated. I will attempt to paste in the expected results and the steps the measure is trying to cover. This definitely got it a step closer and would appreicate if you could take another look. Your meassge is in the matrix all the way to the right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 15:26:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285300#M56021</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-01-16T15:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Spread Forecast Based on Monthly Seasonal % - measure almost complete!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285383#M56029</link>
      <description>&lt;P&gt;I think I understand a bit better now. If you can calculate the last month with sales, then you can create the list of remaining months as&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="Keyword"&gt;GENERATESERIES&lt;/SPAN&gt;&lt;SPAN class="Parenthesis"&gt;&amp;nbsp;(&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="Variable"&gt;LastSalesMonth&lt;/SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;SPAN class="Number"&gt;1&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class="Number"&gt;12&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN class="Parenthesis"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Parenthesis"&gt;I feel like there should be a bit cleaner way of defining LastSalesMonth but give this a try:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;Revised Forecast =
VAR LastSalesMonth =
    MAXX (
        FILTER (
            ALL ( Dates[MonthOfYear] ),
            NOT ISBLANK (
                CALCULATE ( [EC Sales Demo], ALLEXCEPT ( Dates, Dates[MonthOfYear] ) )
            )
        ),
        Dates[MonthOfYear]
    )
VAR RemainingMonths = GENERATESERIES ( LastSalesMonth + 1, 12 )
VAR SumBal =
    SUMX (
        SUMMARIZE (
            FILTER ( ALLSELECTED ( Dates ), Dates[MonthOfYear] IN RemainingMonths ),
            Dates[MonthOfYear],
            "Seasonal Bal", [Seasonal Bal % Mix]
        ),
        [Seasonal Bal]
    )
VAR SeasonalBalMix = [Seasonal Bal % Mix]
VAR Final =
    DIVIDE ( [Remaining FCast] * SeasonalBalMix, SumBal )
RETURN
    IF ( ISBLANK ( SeasonalBalMix ), BLANK (), Final )&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 Jan 2022 18:25:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285383#M56029</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-01-16T18:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Spread Forecast Based on Monthly Seasonal % - measure almost complete!</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285408#M56037</link>
      <description>&lt;P&gt;Hi AlexisOlson:&lt;/P&gt;&lt;P&gt;That was great! Thanks very much, made my day/week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice Sunday!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jan 2022 19:25:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Spread-Forecast-Based-on-Monthly-Seasonal-measure-almost/m-p/2285408#M56037</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-01-16T19:25:35Z</dc:date>
    </item>
  </channel>
</rss>

