<?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: Forecast Mix of Result &amp;amp; Plan in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2560973#M72854</link>
    <description>&lt;P&gt;Hi I found another issue which I need help to address,&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in anymonth BP = 0 then result is calculated as BP,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That as you can understand will show incorrect numbers.&lt;/P&gt;&lt;P&gt;I have a picture below,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BP Number should be this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But it shows as&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;The Result showing in P06 is corrent but result showing as BP is not the corrent behaviour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I though i could just modify the exisiting DAX mesaure to filter out BP before calcuating but that didn't seem to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what i tried.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Plan or Results Sales = 
VAR _ResultSales = CALCULATE([Sales], FILTER(ALL(dimPlan), [Plan] = "Result"))
VAR _Sales = CALCULATE([Sales], FILTER(ALL(dimPlan), [Plan] &amp;lt;&amp;gt; "BP"))
RETURN IF(_Sales&amp;gt;0,_Sales,_ResultSales)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I would fix that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 11:02:28 GMT</pubDate>
    <dc:creator>Mohsin_Hassan</dc:creator>
    <dc:date>2022-06-06T11:02:28Z</dc:date>
    <item>
      <title>Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2502318#M69200</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am an absolute noob at this so excuse me if my question is stupid.&lt;/P&gt;&lt;P&gt;I want to solve a problem that I have,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Begining of the year we plan sales for the whole year month by month we call that BP (Business Plan) &lt;STRONG&gt;[BP Table]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2) Then every month I get forecast for the next 6 month from sales team, and we call that plan (P) and number them P01 (Plan for Jan) P02 (Plan for Feb) and so forth.&amp;nbsp; &lt;STRONG&gt;[Forecast Table]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3) Lastly as the months go by I get Result [Result Table]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do show a rolling forecast where some months are result and some are Forecast.&lt;/P&gt;&lt;P&gt;Ideally I would like the below table but the P05 22 Apr have Result followed by forecast from that Plan.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope im making sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 14:21:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2502318#M69200</guid>
      <dc:creator>Mohsin_Hassan</dc:creator>
      <dc:date>2022-05-09T14:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2502619#M69217</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I would start by transforming the data in the 3 tables to a star schema, rather than having them seperate, like this:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is the code for the 2 measure in the Sales Summary table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales = SUM('Sales Summary'[Sales Amount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Plan or Results Sales = 
VAR _ResultSales = CALCULATE([Sales],REMOVEFILTERS('Plan'),'Plan'[Plan Name]="Result")
VAR _Sales = [Sales]
return 
   IF(_Sales&amp;gt;0,_Sales,_ResultSales)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are 3 matrix visuals showing the results:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I placed the pbix file on my GitHub at&amp;nbsp;&lt;A href="https://github.com/kevarnold972/blogshare/blob/master/Community/Forecast%20Mix%20of%20Result%20%26%20Plan.pbix" target="_blank"&gt;https://github.com/kevarnold972/blogshare/blob/master/Community/Forecast%20Mix%20of%20Result%20%26%20Plan.pbix&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 16:23:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2502619#M69217</guid>
      <dc:creator>karnold</dc:creator>
      <dc:date>2022-05-09T16:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2503966#M69291</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all the work,&lt;/P&gt;&lt;P&gt;There is an issue though, the total in P05 22 is not correct, after adding the result to P05 22 Forecast the total should be $6,234,233 but its $4,890,004 (with out the Result added)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 08:08:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2503966#M69291</guid>
      <dc:creator>Mohsin_Hassan</dc:creator>
      <dc:date>2022-05-10T08:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2505986#M69399</link>
      <description>&lt;P&gt;Good catch. Here is the measure that will produce the proper total by the MonthShort column.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Plan or Results Sales with Total = 
VAR _TotalbyMonth =
    ADDCOLUMNS(
        VALUES( 'Calendar'[MonthShort] ),
        "@Sales", [Plan or Results Sales]
    )
RETURN
    SUMX( _TotalbyMonth, [@Sales] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use that in the last visual I get the better results&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 23:36:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2505986#M69399</guid>
      <dc:creator>karnold</dc:creator>
      <dc:date>2022-05-10T23:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2506659#M69430</link>
      <description>&lt;P&gt;This worked perfectly, thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 06:43:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2506659#M69430</guid>
      <dc:creator>Mohsin_Hassan</dc:creator>
      <dc:date>2022-05-11T06:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2506788#M69434</link>
      <description>&lt;P&gt;Im sorry if you dont mind can you please explain the logic behind this? This is so i can learn &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 07:19:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2506788#M69434</guid>
      <dc:creator>Mohsin_Hassan</dc:creator>
      <dc:date>2022-05-11T07:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Mix of Result &amp; Plan</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2560973#M72854</link>
      <description>&lt;P&gt;Hi I found another issue which I need help to address,&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in anymonth BP = 0 then result is calculated as BP,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That as you can understand will show incorrect numbers.&lt;/P&gt;&lt;P&gt;I have a picture below,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BP Number should be this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But it shows as&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;The Result showing in P06 is corrent but result showing as BP is not the corrent behaviour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I though i could just modify the exisiting DAX mesaure to filter out BP before calcuating but that didn't seem to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is what i tried.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Plan or Results Sales = 
VAR _ResultSales = CALCULATE([Sales], FILTER(ALL(dimPlan), [Plan] = "Result"))
VAR _Sales = CALCULATE([Sales], FILTER(ALL(dimPlan), [Plan] &amp;lt;&amp;gt; "BP"))
RETURN IF(_Sales&amp;gt;0,_Sales,_ResultSales)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I would fix that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 11:02:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Mix-of-Result-amp-Plan/m-p/2560973#M72854</guid>
      <dc:creator>Mohsin_Hassan</dc:creator>
      <dc:date>2022-06-06T11:02:28Z</dc:date>
    </item>
  </channel>
</rss>

