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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Circular Calculation Error

Hi,

 

I run into circular dependency problem.

Below is an example.

- Need to calculate EOH unit cost which is [(BOH * BOH unitCost) + (Sale * Sale UnitCost)]/EOH

- The EOH unit cost will become BOH UnitCost of next month.  

 

Because of this I run into circular calculation ... please help

 

yaneedolruedej_0-1697844723731.png

 

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

Any update on this? Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

HI @Anonymous,

Perhaps you can take a look at following blog about the circular calculation issue and how to avoid it:

Avoiding circular dependency errors in DAX - SQLBI

Regards,

Xiaoxin Sheng

littlemojopuppy
Community Champion
Community Champion

@Anonymous I assume the structure of the table is exactly like shown.

 

Very first thing, you need a date table!  And after you create the date table, you want to mark it as a date table and then create a relationship from that date table to your fact table.  This is important because it will allow you to use Time Intelligence functions.

 

After that, this becomes fairly easy.  You create a measure for EOH Unit Cost as you've shown.  You'll create a second measure for EOH Prior Month.  Then use the EOH Prior Month measure as the starting point for this month calculation.

Anonymous
Not applicable

That what I did. I first create a date table as the BOH and Sale are in different table.

After that I create column in my date table fo BOH and Sale.

 

The EOH UnitCost is a function of BOH unit cost.

And the BOH unit cost is a function of previous month EOH Unit Cost.

 

I think this is how I ran into circular error

I prefaced my reply with "I assume the structure of the table is exactly like shown."  Doesn't sound like that's the case.

 

Let's see sample data from the entire data model.

Anonymous
Not applicable

you still can use the data I post. But number is yellow highlight is a calculated number.
EOH cost = (BOH * BOH Cost) - (Sale * Sale Cost)
and BOH cost = previous month EOH cost.

Hi,

Is 5 i.e. value in cell D2, an input value?  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

Is 5 i.e. value in cell D2, an input value?  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.