<?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 Forecast Incremental Values with POWER Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Incremental-Values-with-POWER-Dax/m-p/3232133#M118642</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate incremental values based on the latest value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As there was a &lt;A href="https://community.powerbi.com/t5/Desktop/What-if-Parameter-Month-over-Month-to-predict-sales/m-p/2228053/thread-id/812762" target="_self"&gt;community post&lt;/A&gt; very similar to my case, I customized the sample partially.&lt;/P&gt;&lt;P&gt;*some of the VAR or column names doesn't make sense as I kept the names from the sample&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the "else" part of the IF syntax is not calculating correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please tell me where I am wrong and how I could fix this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;[Sample]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Using the parameter, Growth %&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fy1+(fy2/365) &amp;amp; Forecast = 
VAR _lastSalesMonth = [Last Sales Month (Last Updated)]
VAR _lastMonthTotal = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastSalesMonth)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastSalesMonth,_thisMonth,DAY)
RETURN
IF(_thisMonth&amp;lt;=_lastSalesMonth,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastMonthTotal*POWER(1+[Growth % Value]/100,_power))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;[My ver. which doesn't calculate "else"]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;colmn calculations are the measure calculations with the formula shown as the column name&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actual &amp;amp; Forecast = 
VAR _lastUpdatedDate = [Last Updated Date]
VAR _lastUpdatedValue = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastUpdatedDate)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastUpdatedDate,_thisMonth,DAY)
RETURN
IF(_thisMonth&amp;lt;=_lastUpdatedDate,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastUpdatedValue*POWER(1+[((fy2-fy1)/fy1)/365)],_power))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your kind advise and help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peru&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 04:46:39 GMT</pubDate>
    <dc:creator>Peru123</dc:creator>
    <dc:date>2023-05-12T04:46:39Z</dc:date>
    <item>
      <title>Forecast Incremental Values with POWER Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Incremental-Values-with-POWER-Dax/m-p/3232133#M118642</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate incremental values based on the latest value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As there was a &lt;A href="https://community.powerbi.com/t5/Desktop/What-if-Parameter-Month-over-Month-to-predict-sales/m-p/2228053/thread-id/812762" target="_self"&gt;community post&lt;/A&gt; very similar to my case, I customized the sample partially.&lt;/P&gt;&lt;P&gt;*some of the VAR or column names doesn't make sense as I kept the names from the sample&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the "else" part of the IF syntax is not calculating correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please tell me where I am wrong and how I could fix this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;[Sample]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Using the parameter, Growth %&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fy1+(fy2/365) &amp;amp; Forecast = 
VAR _lastSalesMonth = [Last Sales Month (Last Updated)]
VAR _lastMonthTotal = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastSalesMonth)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastSalesMonth,_thisMonth,DAY)
RETURN
IF(_thisMonth&amp;lt;=_lastSalesMonth,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastMonthTotal*POWER(1+[Growth % Value]/100,_power))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;[My ver. which doesn't calculate "else"]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;colmn calculations are the measure calculations with the formula shown as the column name&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actual &amp;amp; Forecast = 
VAR _lastUpdatedDate = [Last Updated Date]
VAR _lastUpdatedValue = CALCULATE(SUM('indices_eps (Local)'[fy1+(fy2/365)]),ALL('DateTable'),'DateTable'[Date]=_lastUpdatedDate)
VAR _thisMonth = MAX('DateTable'[Date])
VAR _power = DATEDIFF(_lastUpdatedDate,_thisMonth,DAY)
RETURN
IF(_thisMonth&amp;lt;=_lastUpdatedDate,SUM('indices_eps (Local)'[fy1+(fy2/365)]),_lastUpdatedValue*POWER(1+[((fy2-fy1)/fy1)/365)],_power))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your kind advise and help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peru&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 04:46:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Forecast-Incremental-Values-with-POWER-Dax/m-p/3232133#M118642</guid>
      <dc:creator>Peru123</dc:creator>
      <dc:date>2023-05-12T04:46:39Z</dc:date>
    </item>
  </channel>
</rss>

