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
OS1979
Frequent Visitor

Do I need a circular dependency?

Hello everyone,

 

I need a little help for a capacity sheet in Power BI:

For example I have for one month the following columns:

Requirement previous month (Measure), Requirementcumulative requirement (Requirement + Rerequirement previous month) (Measure), free capacity and result (cumulative requirement - free capacity) (Measure)

So if there is not enough free capacity in a month we put the result in the next month measure like this:

 

Requirement previous month = IF(CALCULATE([cumulative requirement],PREVIOUSMONTH(TAP02N[Datum].[Date])) - CALCULATE(SUM(Endergebnis[free capacity),PREVIOUSMONTH(TAP02N[Datum].[Date])) >0, CALCULATE([kum. Bedarfe],PREVIOUSMONTH(TAP02N[Datum].[Date])) - CALCULATE(SUM(Endergebnis[cumulative requirement]),PREVIOUSMONTH(TAP02N[Datum].[Date]))  , 0 )
 
And now your are thinking right, i get an error for circular dependency if i want to calculate the result. 
But is there a chance for fixing this????
 
Greetings and thanks for any advice
Oliver

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@OS1979 , If you want to  haveexcel like recursive calculation then it is not possible

 

A2= A1 + C1

A3= A2 + C2

 

You have to think cumulative like inventory calc

 

Inventory / OnHand
CALCULATE(firstnonblankvalue('Date'[Month]),sum(Table[Intial Inventory]),all('Date')) + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))

 

Power BI Inventory On Hand
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw

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

View solution in original post

3 REPLIES 3
OS1979
Frequent Visitor

... and it helped me a lot : -) .  I have to rethink my matrix but at the end I thing I have a good solution to present.
Thank you very much

OS1979
Frequent Visitor

Good morning and thank you very much for this idea. I will try it 🙂

amitchandak
Super User
Super User

@OS1979 , If you want to  haveexcel like recursive calculation then it is not possible

 

A2= A1 + C1

A3= A2 + C2

 

You have to think cumulative like inventory calc

 

Inventory / OnHand
CALCULATE(firstnonblankvalue('Date'[Month]),sum(Table[Intial Inventory]),all('Date')) + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))

 

Power BI Inventory On Hand
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw

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.