<?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: Recursive Calculation and Forecast measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3109042#M109727</link>
    <description>&lt;P&gt;Thank you . It's really helpful, I will use this for my projects for recursive calculations. I always try to perform this type of calculation on dbt which is the tool I use for transformation before pulling the data into PBI but some case I only have the data uploaded to PBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you uploaded the wrong file. Could please send my sample file updated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 23:10:56 GMT</pubDate>
    <dc:creator>murillocosta</dc:creator>
    <dc:date>2023-03-02T23:10:56Z</dc:date>
    <item>
      <title>Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102622#M109154</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table containing the value&amp;nbsp;count of rows over a grouped year/week column. I have sorted the data by year/week ascending:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CountRef | Year Week Sort&lt;/P&gt;&lt;P&gt;6&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; 201831&lt;/P&gt;&lt;P&gt;4&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; 201832&lt;/P&gt;&lt;P&gt;9&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; 201833&lt;/P&gt;&lt;P&gt;13&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; 201834&lt;/P&gt;&lt;P&gt;17&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; 201835&lt;/P&gt;&lt;P&gt;7&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; 201836&lt;/P&gt;&lt;P&gt;15&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; 201837&lt;/P&gt;&lt;P&gt;21&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; 201838&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the average value across the rolling previous 4 rows. For example, the average across: 21+15+7+17 = &lt;STRONG&gt;15&lt;/STRONG&gt;, THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&amp;nbsp;+ 21 + 15 + 7 = &lt;STRONG&gt;14.5&lt;/STRONG&gt; THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;14.5&lt;/STRONG&gt; + &lt;STRONG&gt;15&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;+ 21 + 15 = &lt;STRONG&gt;16.37 ....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick here is to include the last calculate value with the previous row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 23:14:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102622#M109154</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-03-02T23:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102728#M109159</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt; , You can create a new table with all Year Week Sort , week number (Assume Date) &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Rank = Rankx(Date, [Year Week Sort], ,desc,dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and new measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last 4 weeks = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]&amp;gt;=max('Date'[Week Rank])-4 &amp;amp;&amp;amp; 'Date'[Week Rank]&amp;lt;=max('Date'[Week Rank])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Week on Week and WTD &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pnAesWxYgJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pnAesWxYgJ8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 02:27:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102728#M109159</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-02-28T02:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102849#M109168</link>
      <description>&lt;P&gt;Thanks for the suggestion, I couldn't replicate it thou....Not sure if someone could give an example in a .pbix file. I will keep trying in the meantime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 04:40:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3102849#M109168</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-02-28T04:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3103302#M109205</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Such fully recursive problems cannot be handled by DAX straight&amp;nbsp;forward. A helper table that suits your case shall be needed to handle the recursion. The solution is a bet difficult to understand and it should be carefully design to suit each case independently (cannot be generalized) nevertheless, what ever the chosen details of the solution, the general idea remains the same.&lt;/P&gt;
&lt;P&gt;You need to import the Fibonacci table as is and use the DAX as is. However, your real data might not be as I expected, therefore some changes might be required.&lt;/P&gt;
&lt;P&gt;Please note that such reports should have limited flexibility in terms of the columns used to slice. Slicing by different&amp;nbsp;column(s) might require changing the code. You need to understand that this is a limitation of the DAX language for the time being, hopping future updates will curry new features of the language such as loops that can help performing recursive calculations much more easier.&lt;/P&gt;
&lt;P&gt;Also Please note that there is a rounding error with this method and the results shall not be 100% accurate.&lt;BR /&gt;Please refer to the sample file with the solution&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Forecast Count = 
VAR W = CALCULATE ( MAX ( 'Table'[Year Week Sort] ), REMOVEFILTERS ( ) ) 
-- with real data would be VAR LastDateWithData 'Table'[Date] and then VAR W = YEAR ( LastDateWithData ) * 100 + WEEKNUM ( LastDateWithData )
VAR CW = MAX ( 'Date'[Year Week Sort] )
VAR S4 = CALCULATE ( [CounRef], 'Date'[Year Week Sort] = W, ALLSELECTED ( ) )
VAR S3 = CALCULATE ( [CounRef], 'Date'[Year Week Sort] = W - 1, ALLSELECTED ( ) )
VAR S2 = CALCULATE ( [CounRef], 'Date'[Year Week Sort] = W - 2, ALLSELECTED ( ) ) 
VAR S1 = CALCULATE ( [CounRef], 'Date'[Year Week Sort] = W - 3, ALLSELECTED ( ) )  
VAR SelectedWeeks = ALLSELECTED ( 'Date'[Year Week Sort] )
VAR WeeksOnAndBefore = FILTER ( SelectedWeeks, 'Date'[Year Week Sort] &amp;gt; W &amp;amp;&amp;amp; 'Date'[Year Week Sort] &amp;lt;= CW )
VAR Ranking = COUNTROWS ( WeeksOnAndBefore )
RETURN
    SUMX ( 
        FILTER ( FibonacciTable, FibonacciTable[Index] = Ranking ),
        FibonacciTable[Value1] * S1 + FibonacciTable[Value2] * S2 + FibonacciTable[Value3] * S3  + FibonacciTable[Value3] * S4
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3103302#M109205</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-28T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3104759#M109343</link>
      <description>&lt;P&gt;Thanks for that tamerk1. I will try to adapt to my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 21:57:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3104759#M109343</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-02-28T21:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105723#M109423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;There was a small mistake in the code in the 4th value&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;However, I've created another solution that is more flexible. You can Chose the number of averaging periods (from 2 up to 12). Ofcourse this can be a parameter selected by the user.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Forecast Count 2 = 
VAR Periods = 4
VAR W = CALCULATE ( MAX ( 'Table'[Year Week Sort] ), REMOVEFILTERS ( ) ) 
VAR CW = MAX ( 'Date'[Year Week Sort] )
VAR SelectedWeeks = ALLSELECTED ( 'Date'[Year Week Sort] )
VAR WeeksOnAndBefore = FILTER ( SelectedWeeks, 'Date'[Year Week Sort] &amp;gt; W &amp;amp;&amp;amp; 'Date'[Year Week Sort] &amp;lt;= CW )
VAR CurrentIndex = COUNTROWS ( WeeksOnAndBefore )
VAR T1 = SELECTCOLUMNS ( GENERATESERIES ( 1, Periods, 1 ), "@ValueInex", [Value] )
VAR T2 = 
    ADDCOLUMNS ( 
        T1, 
        "@Value", 
        VAR ValueIndex = [@ValueInex]
        RETURN
            CALCULATE ( [CounRef], 'Date'[Year Week Sort] = W + ValueIndex - Periods, ALLSELECTED ( ) )
    )
VAR Result =
    SUMX ( 
        T2,
        VAR CurrentValue = [@Value]
        VAR FibTable = 
            FILTER ( 
                Fibonacci_Table, 
                Fibonacci_Table[Index] = CurrentIndex
                    &amp;amp;&amp;amp; Fibonacci_Table[Period Index] = Periods
                    &amp;amp;&amp;amp; Fibonacci_Table[Value Index] = [@ValueInex]
            )
        VAR FibValue = MAXX ( FibTable, Fibonacci_Table[Value] )
        RETURN
            CurrentValue * FibValue
    )
RETURN
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Mar 2023 10:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105723#M109423</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-01T10:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105746#M109426</link>
      <description>&lt;P&gt;Hi tamerj1, thanks for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been tryingo to get it done for hours but still couldn't figure out why on my scenary is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to check my file below and help me out?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://easyupload.io/4r0p0e" target="_blank"&gt;https://easyupload.io/4r0p0e&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:18:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105746#M109426</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-03-01T11:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105823#M109435</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here you go&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 12:28:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3105823#M109435</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-01T12:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107679#M109654</link>
      <description>&lt;P&gt;Hey tamerj1, just one more question. If I need to change the average from 4 to n.....how would you update the fibonacci table values????is there any place you can get it from?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 11:43:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107679#M109654</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-03-02T11:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107689#M109656</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check my 2nd solution based on dynamic selection of the number of periods. I will apply over your sample file and share it with you. Probably not today as today I'm out of office the whole day&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 11:49:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107689#M109656</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-02T11:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107883#M109673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Attached your sample file updated with the dynamiuc solution&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Total Outbound Final 2 = 
VAR Periods = [Number of Periods Value]
VAR TotalOutBound = [Total Outbound]
VAR W = CALCULATE ( MAX ( 'SUMMARIZE'[Week Rank] ), 'SUMMARIZE'[Total Outbound] &amp;lt;&amp;gt; 0, REMOVEFILTERS ( ) ) 
VAR CW = MAX ( 'SUMMARIZE'[Week Rank] )
VAR SelectedWeeks = CALCULATETABLE ( VALUES ( 'SUMMARIZE'[Week Rank] ), ALLSELECTED ( ) )
VAR WeeksOnAndBefore = 
    FILTER( 
        SelectedWeeks, 
        'SUMMARIZE'[Week Rank] &amp;gt; W &amp;amp;&amp;amp; 'SUMMARIZE'[Week Rank] &amp;lt;= CW
    )
VAR CurrentIndex = COUNTROWS ( WeeksOnAndBefore )
VAR T1 = SELECTCOLUMNS ( GENERATESERIES ( 1, Periods, 1 ), "@ValueInex", [Value] )
VAR T2 = 
    ADDCOLUMNS ( 
        T1, 
        "@Value", 
        VAR ValueIndex = [@ValueInex]
        RETURN
            CALCULATE ( [Total Outbound], 'SUMMARIZE'[Week Rank] = W + ValueIndex - Periods, ALLSELECTED ( ) )
    )
VAR Result =
    SUMX ( 
        T2,
        VAR CurrentValue = [@Value]
        VAR FibTable = 
            FILTER ( 
                Fibonacci_Table, 
                Fibonacci_Table[Index] = CurrentIndex
                    &amp;amp;&amp;amp; Fibonacci_Table[Period Index] = Periods
                    &amp;amp;&amp;amp; Fibonacci_Table[Value Index] = [@ValueInex]
            )
        VAR FibValue = MAXX ( FibTable, Fibonacci_Table[Value] )
        RETURN
            CurrentValue * FibValue
    )
RETURN
    Result + TotalOutBound&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 04:54:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3107883#M109673</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-03T04:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3108155#M109684</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have updated the solution, have you checked? Actually, you csnnot find this table anywhere else. This is something I have created out of a mathematical research and reasoning inspired by the Fibonacci numerical series. Perhaps you are the first one on earth to have a real business Power Bi report that performs real recursive calculations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 15:26:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3108155#M109684</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-02T15:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3109042#M109727</link>
      <description>&lt;P&gt;Thank you . It's really helpful, I will use this for my projects for recursive calculations. I always try to perform this type of calculation on dbt which is the tool I use for transformation before pulling the data into PBI but some case I only have the data uploaded to PBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you uploaded the wrong file. Could please send my sample file updated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 23:10:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3109042#M109727</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-03-02T23:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3109438#M109753</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Apologies for that. The attachment&amp;nbsp;in my previous reply has been updated. Please check.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 04:56:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3109438#M109753</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-03T04:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3118451#M110483</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to help me calculate the "Total Outbound Final 2" for the past records as well instead of just repeating the "Total Outbound" as below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The ideia is to create a compararion of the actual spend vs forecast that was calculated in the past.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried it today for couple of hours but it seems that it will require to change Fibonacci table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;Let suppose we pick 7 for the "Number of Period" so the first 7 rows we would need to repeat the Total Outbound (as we won't have enough data to calculate average) and from the eight row we start calculating it recursively as it's already doing for forecast.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 10:16:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3118451#M110483</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-03-08T10:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288468#M122351</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please how did you generate your Fibonacci Table?&lt;/P&gt;&lt;P&gt;Can you attach it?&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 19:18:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288468#M122351</guid>
      <dc:creator>aj1973</dc:creator>
      <dc:date>2023-06-16T19:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288530#M122355</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="80472" data-lia-user-login="aj1973" class="lia-mention lia-mention-user"&gt;aj1973&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The whole idea is complex. Even I don't remember all details. It is even more complex to explain. I was planning to leave an article about this subject in the forum but then I did not see much demand to such approach. Perhaps I'll think again. I'll keep you updated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 20:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288530#M122355</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-16T20:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288617#M122363</link>
      <description>&lt;P&gt;Thank you very much, I should admit that I am really impressed.&lt;/P&gt;&lt;P&gt;Good work,&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 22:51:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3288617#M122363</guid>
      <dc:creator>aj1973</dc:creator>
      <dc:date>2023-06-16T22:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3853879#M150569</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I stumbled upon this post while searching for a solution similar to the one you provided. I need to calculate data based on previously calculated data using the same metric. Your solution is truly impressive! Thank you for sharing it.&lt;/P&gt;&lt;P&gt;Now, I'm working on adapting it to my needs, and I'm hopeful that I'll manage to make it work. Regarding the Fibonacci_Table, is that the only method available for performing such calculations?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 13:10:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3853879#M150569</guid>
      <dc:creator>vitorcampos</dc:creator>
      <dc:date>2024-04-19T13:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Recursive Calculation and Forecast measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3854024#M150574</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="728336" data-lia-user-login="vitorcampos" class="lia-mention lia-mention-user"&gt;vitorcampos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad that you found that helpful.&amp;nbsp;&lt;BR /&gt;Regarding your question, to be honest I have not been following up on this subject for some time. I'm not aware of any other method. In fact he Fibonacci table is some that I have invented couple of years ago to tackle this issue of recursion following mathematical approach.&amp;nbsp;&lt;BR /&gt;As far as I know&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;was following up on this subject since long time ago. I believe no one can advise on this subject better than he can do.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 14:16:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-p/3854024#M150574</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-04-19T14:16:02Z</dc:date>
    </item>
  </channel>
</rss>

