Forum Discussion
Circular dependency.....why???
- 2 years ago
Your calendar table is derived from your fact table. That is akin to using CALENDARAUTO, and is Very Bad Indeed.
Overcome the urge to create calendar scripts in DAX or Power Query. They are useless. Use an external reference table.
You also don't need to specify table names in calculated columns.
A circular dependency error typically occurs when a calculated column references another calculated column which in turn references the original column, creating a loop. In your case, the Timing calculated column references the HourDiff calculated column, which itself references other columns in the table, including SC2[DT311].
To avoid the circular dependency, you can rewrite the Timing column without directly referencing the HourDiff column. Here's a modified version:
In this version, we're using the CALCULATE function to evaluate the maximum value of the HourDiff column within the current context. This avoids the circular reference issue, allowing you to determine whether the value exceeds 24 and return "Late" or "On Time" accordingly.