Forum Discussion
Circular dependency error
Hi stephenbeech
It appears that you have encountered a cyclic dependency error when calculating the DAX for a year-to-date (YTD) column.
This typically occurs when two or more calculated columns or metrics indirectly reference each other, creating loops that cannot be resolved.
From the code snippet you provided, it appears that both calculated columns reference the same column and use a similar pattern to calculate and .
However, without knowing the full context of the data model and the relationship between the tables, it is difficult to determine the exact cause of the circular dependency.
Here are some of the suggestions I've provided for you to try out:
Make sure there are no circular references in the relationships between tables.
Break down complex calculations into simpler intermediate steps. This sometimes helps to determine where circular references occur.
Consider using metrics instead of calculated columns; metrics are calculated at query time and can often avoid circular dependencies.
Circular dependencies can also come from the filter context of the CALCULATE application. Make sure that the filters you apply do not create loops.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.