Forum Discussion
Circular Dependency Issue on measures
I am looking for some help on a recent issue we are running into regarding a circular dependency. Any guidance on a simple way around this would be great. In the table below, each column is a specific measure that we put together. The beginning balance is taking the ending value from the previous period (row). For this we are using the PREV ENDING measure. When I go to reference that PREV ENDING measure in the CLOSEOUT measure that is when the circular dependency hits. I have read up on this topic a lot, but I have not been able to find a way around this. Maybe I am just overthinking at this point. Any help would be greatly appreciated.
The way around this circular dependency error for me was to just go a different route and keep a rolling total of the activity each period. It seems to be working for my requirements. Not a direct way to solve the circular dependency, but it was a good solution around it.
Measures:
Rolling Total = [New] + [Modifications] + [Refinement]
Ending = [Rolling Total] - [Awarded]
5 Replies
- amitchandak
Super User
mkoontz ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Also refer : https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
- PhilipTreacy
Super User
Hi mkoontz
What's in your [PREV Ending] measure?
The error seems to indicate that [Ending] relies on [Closeout] which relies on [PREV Ending] which relies on [Ending].
Regards
Phil
- mkoontzFrequent Visitor
Thank you for the reply. Your exactly right. Those are the measures that are relying on each other. Unfortunately that is how I need it for the report. The PREV Ending measure is below the table in my original post. Anyway around this you can think of? Do I need to put some of this logic back in SQL?
PREV Ending = Ending balance from previous line
Beginning Balance = PREV Ending
Closeout = Beginning Balance + New + Mods + Awarded + Refinement (only shows when project closes)
Ending = Beginning Balance + New + Mods + Awarded + Refinement or Closeout (same formula)
- v-janeyg-msft
Community Support
Hi, mkoontz
Your question is obvious. There is no need to repeat the explanation. The key lies in how you want to deal with it. There are always at least one column that don't rely on the measures. If you don’t make it clear, it will be difficult for us to help you. Can you share some fake data and your desired result?
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- mkoontzFrequent Visitor
The way around this circular dependency error for me was to just go a different route and keep a rolling total of the activity each period. It seems to be working for my requirements. Not a direct way to solve the circular dependency, but it was a good solution around it.
Measures:
Rolling Total = [New] + [Modifications] + [Refinement]
Ending = [Rolling Total] - [Awarded]