Forum Discussion

Hgsilva's avatar
Hgsilva
Frequent Visitor
1 year ago
Solved

Date table relationship not working

When I build a relationship between date table and main data source it breaks all visuals associated with date. I am trying to create a line graph visual ordered by fiscal month. The report final dat...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Thanks for the reply from Idrissshatila , please allow me to provide more details about circular dependency.

    Hi Hgsilva ,

    Circular dependencies occur when a calculation depends on itself, directly or indirectly. In Power BI, this can happen when you create a calculated column that refers to itself, or when you have multiple calculated columns that refer to each other. Here are some common scenarios and solutions:

    • Calculated Columns Referencing Each Other: If you create two calculated columns that reference each other, you are generating a circular dependency.
    • Context Transition Inside a Calculated Column: If you use CALCULATE in a calculated column, it performs a context transition and makes that column dependent on all the columns in the table. If two such columns exist, they depend on each other, causing a circular dependency. The solution is to restrict the list of columns that the calculated column depends on by using ALLEXCEPT or REMOVEFILTERS and keeping only the table’s primary key.
    • Creating a Relationship Involving a Calculated Column or Table: This can also cause a hidden circular dependency.

    To fix a circular dependency, you need to find the source of the circular reference and either remove it or redesign the calculation so that it does not depend on itself. You could review the following links to understand circular dependencies, avoid it and how to fix it when you got the circular dependencies error.

    Understanding circular dependencies in DAX - SQLBI

    Avoiding circular dependency errors in DAX - SQLBI

    Best regards,

    Lucy Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!