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 August 31st. Request your voucher.

Reply
Chxlsea_
Regular Visitor

Circular Dependency

Chxlsea__0-1748599362691.png

Hi i am getting this circular dependency which is currently preventing my dashboard from working. 

What i believe is happening is; 

New Project Data sheet has a column in it which looks at the Project Definition and matches it to the Project Definition in the CombinedDispatches sheet to get the Financial Year. I've done this so in the New Project Data sheet i can create a LinkKey which requires the year. Does anyone know how i can get around this? 

2 ACCEPTED SOLUTIONS
v-dineshya
Community Support
Community Support

Hi @Chxlsea_ ,

Thank you for reaching out to the Microsoft Community Forum.

 

Thank you @burakkaragoz , for posting reponse in this community and thank you for your suggestions and workarounds.

 

Hi @Chxlsea_ ,

Please check below things to fix the issue.

1. Move Logic to Power Query

Avoid calculated columns in DAX for things like this, especially if they involve values from other tables.

Go to Power Query (Transform Data). Merge New Project Data with CombinedDispatches using Project Definition. Bring in the Financial Year column from CombinedDispatches during the merge. Construct your LinkKey in Power Query using the now-available Financial Year.

Note: Power Query flattens your data before the data model loads, breaking the circular dependency.

2. Use a Bridge Table

If merging isn’t feasible, Create a Project Definition Bridge Table with unique Project Definition and Financial Year. Link CombinedDispatches, New Project Data, and StandardCost all to this bridge using Project Definition (and Financial Year if needed). Ensure you are not computing values across these tables in ways that reintroduce implicit relationships via calculated columns.

Please avoid below things.

Using DAX-calculated columns to pull in fields from related tables and then using those same fields to build relationships. Creating bi-directional filters unless absolutely necessary.

3. Move the Financial Year lookup to a separate helper table:

Create a new table that maps Project Definition to Financial Year. Use this table to populate Financial Year in New Project Data without referencing LinkKey.
Calculate Financial Year first. Ensure Financial Year is calculated independently of LinkKey. Then use it to build LinkKey.

4. Use Power Query instead of DAX:

Perform the lookup and column creation in Power Query (Get & Transform) before loading the data into the model. This avoids circular logic in the data model.

 

Please refer community threads.

Solved: Need Help in Resolving Circular Dependency - Microsoft Fabric Community

Solved: "A circular Dependency was detected" error while c... - Microsoft Fabric Community

Solved: Circular dependency - Microsoft Fabric Community

Solved: Circular dependency in a calculated column - Microsoft Fabric Community

Solved: Circular dependency in Power Bi - Microsoft Fabric Community

Solved: Circular Dependency on Calculated Columns - Microsoft Fabric Community

Solved: Circular Dependency while creating multiple calcul... - Microsoft Fabric Community

Solved: Calculated table generates a circular dependency w... - Microsoft Fabric Community

Solved: circular relationship - Microsoft Fabric Community

Solved: How to fix circular dependency in two calculated c... - Microsoft Fabric Community

Solved: Circular dependency when sorting by column - Microsoft Fabric Community

Solved: Circular Dependancy when creating Relationship - Microsoft Fabric Community

Solved: Re: Circular dependency - Microsoft Fabric Community

Solved: circular relationship - Microsoft Fabric Community

Solved: How to eliminate a circular dependency? - Microsoft Fabric Community

Solved: Circular Dependency with LOOKUPVALUE - Microsoft Fabric Community

Solved: Circular Dependency with Date Tables - Microsoft Fabric Community

Solved: circular depenency only in Power BI Service but no... - Microsoft Fabric Community

 

If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.

Thank you

View solution in original post

pankajnamekar25
Super User
Super User

Hello @Chxlsea_ 

try this

If you must keep calculated columns in DAX, avoid creating physical relationships and instead use DAX functions like

Column =CALCULATE(

    [YourMeasure],

    TREATAS(VALUES('New Project Data'[LinkKey]), 'StandardCost'[LinkKey])

)

This avoids circular relationships because TREATAS creates a virtual relationship just for that measure.

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

View solution in original post

6 REPLIES 6
pankajnamekar25
Super User
Super User

Hello @Chxlsea_ 

try this

If you must keep calculated columns in DAX, avoid creating physical relationships and instead use DAX functions like

Column =CALCULATE(

    [YourMeasure],

    TREATAS(VALUES('New Project Data'[LinkKey]), 'StandardCost'[LinkKey])

)

This avoids circular relationships because TREATAS creates a virtual relationship just for that measure.

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

v-dineshya
Community Support
Community Support

Hi @Chxlsea_ ,

Thank you for reaching out to the Microsoft Community Forum.

 

Thank you @burakkaragoz , for posting reponse in this community and thank you for your suggestions and workarounds.

 

Hi @Chxlsea_ ,

Please check below things to fix the issue.

1. Move Logic to Power Query

Avoid calculated columns in DAX for things like this, especially if they involve values from other tables.

Go to Power Query (Transform Data). Merge New Project Data with CombinedDispatches using Project Definition. Bring in the Financial Year column from CombinedDispatches during the merge. Construct your LinkKey in Power Query using the now-available Financial Year.

Note: Power Query flattens your data before the data model loads, breaking the circular dependency.

2. Use a Bridge Table

If merging isn’t feasible, Create a Project Definition Bridge Table with unique Project Definition and Financial Year. Link CombinedDispatches, New Project Data, and StandardCost all to this bridge using Project Definition (and Financial Year if needed). Ensure you are not computing values across these tables in ways that reintroduce implicit relationships via calculated columns.

Please avoid below things.

Using DAX-calculated columns to pull in fields from related tables and then using those same fields to build relationships. Creating bi-directional filters unless absolutely necessary.

3. Move the Financial Year lookup to a separate helper table:

Create a new table that maps Project Definition to Financial Year. Use this table to populate Financial Year in New Project Data without referencing LinkKey.
Calculate Financial Year first. Ensure Financial Year is calculated independently of LinkKey. Then use it to build LinkKey.

4. Use Power Query instead of DAX:

Perform the lookup and column creation in Power Query (Get & Transform) before loading the data into the model. This avoids circular logic in the data model.

 

Please refer community threads.

Solved: Need Help in Resolving Circular Dependency - Microsoft Fabric Community

Solved: "A circular Dependency was detected" error while c... - Microsoft Fabric Community

Solved: Circular dependency - Microsoft Fabric Community

Solved: Circular dependency in a calculated column - Microsoft Fabric Community

Solved: Circular dependency in Power Bi - Microsoft Fabric Community

Solved: Circular Dependency on Calculated Columns - Microsoft Fabric Community

Solved: Circular Dependency while creating multiple calcul... - Microsoft Fabric Community

Solved: Calculated table generates a circular dependency w... - Microsoft Fabric Community

Solved: circular relationship - Microsoft Fabric Community

Solved: How to fix circular dependency in two calculated c... - Microsoft Fabric Community

Solved: Circular dependency when sorting by column - Microsoft Fabric Community

Solved: Circular Dependancy when creating Relationship - Microsoft Fabric Community

Solved: Re: Circular dependency - Microsoft Fabric Community

Solved: circular relationship - Microsoft Fabric Community

Solved: How to eliminate a circular dependency? - Microsoft Fabric Community

Solved: Circular Dependency with LOOKUPVALUE - Microsoft Fabric Community

Solved: Circular Dependency with Date Tables - Microsoft Fabric Community

Solved: circular depenency only in Power BI Service but no... - Microsoft Fabric Community

 

If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.

Thank you

Hi @Chxlsea_ ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

 

Thank you.

Hi @Chxlsea_ ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

 

Thank you.

Hi @Chxlsea_ ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

 

Thank you.

burakkaragoz
Community Champion
Community Champion

Hi @Chxlsea_ ,

 

Yeah, circular dependencies like this usually happen when two tables are indirectly depending on each other’s calculated columns — especially when you're using something like RELATED() or LOOKUPVALUE() across both.

Here’s how you can break the loop:

  1. Move the logic to a measure instead of a calculated column
    If you don’t need the result at row-level for filtering, try using a measure to fetch the Financial Year dynamically.

  2. Use Power Query instead
    Do the join between New Project Data and CombinedDispatches in Power Query (via Merge Queries). This avoids circular logic entirely since it’s done before the model loads.

  3. Create a separate reference table
    Extract the Project Definition and Financial Year into a new table, and relate both original tables to it. Then use RELATED() from that new table.

Circular dependencies are tricky, but usually a sign that some logic needs to shift from the model layer to Power Query or be restructured via relationships.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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