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
Anonymous
Not applicable

Calculate prognosed total / circular dependency issue

Hi all,

 

For a liquidity prognosis I want to make a measure that calculates the month's total liquid position based on previous months' expenses and prognosed liquid position.

My table has 4 rows:

- Expenses > lists all planned expenses in this month

- Cash position > The cash position at the start of the current month

- Prognosis > Equals the total of cash position + expenses for the next month

- Total > Equals the total of Expenses + Cash position + Prognosis

 

As the sharp reader will have realized, [Prognosis] and [Total] are in a circular dependency. However, logically I believe there has to be a way to have the total calculated based on the formula's own result in the previous month. Has anyone got some insights into this problem? 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

I managed to solve the problem by simply creating 12 measures (one for each month) that each take the total value of the month before.

I think my desired outcome is impossible in Power BI, as it will always lead to circularity.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak 

Liquidity = SUM(tb_Budget[AmountDC]
 
 
LiquidityCashPosition =
VAR Date_select =
IF (
MONTH ( TODAY () ) = 1 && DAY( TODAY () ) <= 16,
DATE ( YEAR ( TODAY () ) - 1, 12, 1 ),
IF ( MONTH ( TODAY () ) > 1 && DAY ( TODAY () ) <= 16,
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) -1, 1),
IF (DAY( TODAY () ) > 16,
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
)))
RETURN
CALCULATE(SUM(tb_BankEntries[OpeningBalanceFC]), tb_BankEntries[Created] = Date_select)
 
LiquidityPrognosis = IF([LiquidityCashPosition ] > 0, 0, CALCULATE([LiquiditeitTotaal], DATEADD(dimdate[Date], -1, MONTH)))
 
LiquidityTotal = 
[LiquidityCashPosition ] + [Liquidity] + CALCULATE([LiquiditeitPrognosis], DATEADD(dimdate[Date], -1, MONTH))
 
 
As you can see the liquiditytotal refers to prognosis and prognosis refers to the total, but since the prognosis should use the total of the previous month, I believe it should be possible to avoid the circular dependency.
Anonymous
Not applicable

Hi @Anonymous ,

In order to make it clearer and easier to understand your problem and find the right way to solve it, could you please provide some data from the involved tables (without sensitive data) and some practical examples to illustrate the problem and the backend logic. Thank you.

And for circular dependency, you can get more details in the following links.

Avoiding circular dependency errors in DAX

Anonymous
Not applicable

Hi,

 

I managed to solve the problem by simply creating 12 measures (one for each month) that each take the total value of the month before.

I think my desired outcome is impossible in Power BI, as it will always lead to circularity.

amitchandak
Super User
Super User

@Anonymous ,

Prognosis is using Cash position and Expenses  then they are not

 

and if Prognosis  using Cash position then what is the need to use it again.

 

Can you share actual formula 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.