Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Circular dependency error

Hi all. Been reading and reading and I still don't understand how to solve this problem.


I have two calculated columns that are similar, but reference two different sets of date columns (to calculate date differences in days).  Here they both are...


_Force&Assign =

VAR max1 = MAX ( 'Table_query'[FORCE Creation Date], 'Table_query'[Date Assigned] )

VAR min1 = MIN ( 'Table_query'[FORCE Creation Date], 'Table_query'[Date Assigned] )

RETURN SWITCH(TRUE() ,ISBLANK(max1)||ISBLANK(min1), BLANK() ,CALCULATE ( SUM ( 'Calendar'[If work day] ), ALL ( 'Calendar' ), DATESBETWEEN ( 'Calendar'[Date], min1, max1 ) ) )
second one is:
_Assign&Award =

VAR max1 = MAX ( 'Table_query'[Date Assigned], 'Table_query'[Date Awarded] )

VAR min1 = MIN ( 'Table_query'[Date Assigned], 'Table_query'[Date Awarded] )

RETURN SWITCH(TRUE() ,ISBLANK(max1)||ISBLANK(min1), BLANK() ,CALCULATE ( SUM ( 'Calendar'[If work day] ), ALL ( 'Calendar' ), DATESBETWEEN ( 'Calendar'[Date], min1, max1 ) ) )
They both work fine. THE MAIN PROBLEM is that my "Year" filter slicer is not working. When I choose any year, all my visuals go "(blank)".
The current established relationship between 'Table_query' and 'Calendar' is the following

My "Year" filter slicer only seems to work when the cross filter direction is set to both, but if I do that while my two calculated columns above exist, I get this circular dependency error.



Any ideas on how to fix this? Because I am lost.

Super User
Super User

Hi @pintobean87 ,


Since you are making the sum of the Calendar[Ifwork day] you are getting this circular reference. Believe that the best option in this case is not to have calculated columns but have measures instead, so you should delete this columns and create the relationship and then add the calculations has measures.


Be aware that making the shift to measure may require some adjustments to the calculations.


Miguel Félix

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors