Forum Discussion

Niraj_vora0106's avatar
Niraj_vora0106
Helper III
3 years ago
Solved

Circular dependency

Hi community,

 

I have a doubt regarding Circular dependency.

 

I have one table imported in Power BI, source Excel

whem I'm trying to create Calculated columns, I'm getting circular dependency error.

 

First I created Total Vol-Scheme column and since then when I'm trying to create other calculated columns I'm getting circular dependency error.

 

Below is the snip of the error:

 

 

Please help.

 

  • Hi Niraj_vora0106 ,

     

    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.

    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.

    In your case, it looks like you are trying to create a calculated column that sums the values in the final[vol] column and then filters the result using allselected. However, it is not clear how this calculated column is related to the Total Vol-Scheme column you mentioned, or whether there is a circular reference between the two columns.

    To troubleshoot this issue, you can try the following steps:

    • Check the formula of the Total Vol-Scheme column to see if it refers to itself or to any other calculated columns. If it does, you will need to redesign the calculation so that it does not depend on itself.
    • Check the formula of the calculated column that is giving you the error to see if it refers to itself or to any other calculated columns. If it does, you will need to redesign the calculation so that it does not depend on itself.
    • If you are still unable to identify the source of the circular reference, you can try creating a new calculated column using a simplified version of the formula, such as = 1 + 1, to see if the error persists. This will help you determine whether the error is caused by the formula itself or by some other factor.

    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


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

13 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi Niraj_vora0106 ,

     

    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.

    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.

    In your case, it looks like you are trying to create a calculated column that sums the values in the final[vol] column and then filters the result using allselected. However, it is not clear how this calculated column is related to the Total Vol-Scheme column you mentioned, or whether there is a circular reference between the two columns.

    To troubleshoot this issue, you can try the following steps:

    • Check the formula of the Total Vol-Scheme column to see if it refers to itself or to any other calculated columns. If it does, you will need to redesign the calculation so that it does not depend on itself.
    • Check the formula of the calculated column that is giving you the error to see if it refers to itself or to any other calculated columns. If it does, you will need to redesign the calculation so that it does not depend on itself.
    • If you are still unable to identify the source of the circular reference, you can try creating a new calculated column using a simplified version of the formula, such as = 1 + 1, to see if the error persists. This will help you determine whether the error is caused by the formula itself or by some other factor.

    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


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

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have been running smooth for months and when I recently opened up a few of my PowerBi projects I am now getting an error I have never seen before.  Nothing has changed with my projects and I am at a loss of where to search for the solution.  Here is a screenshot of my error.  Any direction would be helpful.  

    • blat91's avatar
      blat91
      New Member

      I am having this very same issue! Our keys are different, but he error is exactly the same! Did you find a fix?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Yes I was able to find a work around for the issue.  Instead of using "Calendar = Calendarauto()" I had to specify a date range for CalendarAuto to recognize.  I switched it to "Calendar = Calendar(Date (2018,1,1), Date (2030,12,31)" and everything went back to working.  This means instead of CalendarAuto seaching for its own range, you will be specifying the range in which the calendar table is limited to.  Hope this helps!

    • mkjit256's avatar
      mkjit256
      Advocate II

      Hello Anonymous the same happened with me, report running smooth for so long and suddenly i am seeing the error similar to what you have encountered.

      What did i do was to open the model in tabular model to check what are the objects that are causing the circular dependency, as i am not seeing these objects anywhere. Here what i had found in case someone can use the update to do more diagnostic.
      Date Table-d188f3a1-1e2a-4591-a5de-eeac201d2b16 seems to be a hidden partition, of hte Date Table, that i had created using the CalendarAUTO() function.

      and 0d021f6e-f2a2-4198-819d-451cf5dce71f is a realtionship between two of Date Table and Revenue Budget table:

      I am unable to delete the relationship any relation related to the Date Table. Any attempt to delete any relationship to the Date Table throw the error above. 

       




      • sophiad0715's avatar
        sophiad0715
        New Member

        Hello! I have a pending Microsoft ticket in for this currently. I was told that this issue would be fixed when the December update was released, but now with Microsoft taking a break for the rest of the Month...it looks like this issue will not get resolved until sometime in January.

         

  • Calculate(SUMX(Allselected(Final[Vol-Actual]),final[Vol-Actual]))

     

    i hope it is helpful for you.

     

  • hello i'm new to DAX, i trying to calculate two calcualted columns and there is circular dependency error.

    Orig. profit/day =
    DIVIDE (
        CALCULATE (
            SUM ( Budget[infoJson.Projected over Under] ),
            Budget[vIsCurrentBudget] = "Not current"
        ),
        (
            RELATED ( Project[estimated_completion_date] )
                RELATED ( Project[estimated_start_date] )
        )
    )

     

    Curr Profit/day =
    DIVIDE (
        CALCULATE (
            SUM ( Budget[infoJson.Projected over Under] ),
            Budget[vIsCurrentBudget] = "current"
        ),
        (
            RELATED ( Project[projected_finish_date] )
                RELATED ( Project[actual_start_date] )
        )
    )

    please help me resolve this issue.