Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
BGR
New Member

Formula: calculate based on the result of the previous calculated row

Hello

I am trying to calculate a growth model. This model uses the previous days data and multiplies this data with a factor. The result is the prediction of the current day. The next day's prediction uses the result from the previous day and applies the same logic again. 

Here is the formula I am currently using but I get this error "A circular dependency was detected: CU - Forecast Model Setup[Model Future Hybrid Hours Build]."

Model Future Hybrid Hours Build = 
if (DATEADD ( 'CU - Forecast Model Setup'[Date] , - 1, DAY ) IN VALUES ( 'CU - Forecast Model Setup'[Date] ),
    VAR CurrentPlatform = 'CU - Forecast Model Setup'[platform_id] 
    RETURN 
        if( 'CU - Forecast Model Setup'[Date] >= TODAY() ,
                CALCULATE(
                    SUM('CU - Forecast Model Setup'[Model Future Hybrid Hours Build]),
                    FILTER( 
                        'CU - Forecast Model Setup',
                        'CU - Forecast Model Setup'[Date] = EARLIER('CU - Forecast Model Setup'[Date]) - 1 &&
                        'CU - Forecast Model Setup'[platform_id] = CurrentPlatform
                    )
                )
                * 
                (1 +
                    CALCULATE(
                        SUM('CU - Forecast Model Setup'[Model Expected Daily Forecast Growth]),
                        FILTER( 
                            'CU - Forecast Model Setup',
                            'CU - Forecast Model Setup'[Date] = EARLIER('CU - Forecast Model Setup'[Date]) - 1 &&
                            'CU - Forecast Model Setup'[platform_id] = CurrentPlatform
                        )
                    )
                )
            ,
            IF( 'CU - Forecast Model Setup'[Date] < TODAY() ,
                'CU - Forecast Model Setup'[Actual Hybrid Hours],
                0
            )
        )
, BLANK()
)

 


In excel I could easily create this model with referencing the formula on the cell above... How could I do this in Powerbi? 

Thank you!

1 REPLY 1
tamerj1
Super User
Super User

Hi @BGR 

It is not clear what are you trying to achieve. Please see if it is something like this 

https://community.powerbi.com/t5/DAX-Commands-and-Tips/Recursive-Calculation-and-Forecast-measure/m-...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.