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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Niels_NL
Advocate I
Advocate I

Circular dependency detected

Hey guys,

 

Here's the situation:

  • Customer table (customerID, revenue2014, revenue2015, revenue2016, revenueTotal)
  • CustomerBase table (customerID, customerName, etc.)
  • Revenue table 2014 (customerID, ordertotal, etc.)
  • Revenue table 2015 (customerID, ordertotal, etc.)
  • Revenue table 2016 (customerID, ordertotal, etc.)

Relations are as followed:

  • Revenue tables > Customer table (linked on customerID)
  • Customer table > CustomerBase table (linked on customerID)

In the 'Customer' table I used some DAX measures to calculate the total revenue for each year and put them in the designated columns. Example of such a DAX measure:

revenue2014 = CALCULATE(SUM(tbl_revenue2014[ordertotal]);tbl_CustomerBase[customerID])

After doing this for each year, I created a DAX measure to sum 2014, 2015 and 2016 into a 'revenueTotal'. This one is as follows:

revenueTotal = CALCULATE(SUM(tbl_Customer[revenue2014])+SUM(tbl_Customer[revenue2015])+SUM(tbl_Customer[revenue2016]);tbl_Customer[customerID])

 

Now, after this, I'd like to create a new column containing a % of share in revenue for each customer. So "( total revenue generated by customer / total revenue of all ) * 100%".

I tried this DAX measure:

%_Share = tbl_Customer[revenueTotal]/SUM(tbl_Customer[revenueTotal])

But this gives me the error (translated from Dutch in English): 

" There is a circular dependency detected: tbl_Customer[revenueTotal], tbl_Customer[%_Share], tbl_Customer[revenueTotal] "

 

I can't seem to find what this error exactly means and how I can solve it or create a workaround. Anyone has any thoughts?

 

Thanks,

Niels

3 REPLIES 3
Rsmith
New Member

I am new to this and have just gotten a circular dependency error message:

 

A circular dependency was detected: 'TPID_DATA'[L1_Proactv_BaseRev],'TPID_DATA'[Calculated Column 1],'TPID_DATA'[Calculated Column 1],'TPID_DATA'[L1_Proactv_BaseRev],'TPID_DATA'[L1_Proactv_BaseRev].

 

The formula I wrote:

 

=CALCULATE(sum(TPID_DATA[L1_ProactiveBase_Rev]))

 

I am not sure why I am getting this error. Any sugguestions?  Thank you!

 

Sorry, please disregard. Evidently way too new... figured this one out... that said, I am still running into circular dependency issues for this model and would appreciate being directed to any documentation that is written for those of us who are not sql programmers  :).... anything written in something that is a little more basic or plain english....

 

thank you!

 

Eric_Zhang
Microsoft Employee
Microsoft Employee

Hi Niels_NL,

Change the DAX expression of revenueTotal a little bit and your %_Share expression would work.

revenueTotal = CALCULATE(SUM(tbl_Customer[revenue2014])+SUM(tbl_Customer[revenue2015])+SUM(tbl_Customer[revenue2016]),tbl_CustomerBase[customerID])



Regarding the circular depency, check Understanding Circular Dependencies in Tabular and PowerPivot.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.