Forum Discussion

Anika3186's avatar
Anika3186
Frequent Visitor
3 years ago
Solved

Ring dependency detected for second calculated column

Hello,

 

I got an error message on a calculated column. Initial situation: I created a table and a calculated column that gives me sales divided by sales:

 

Average Retail Price = DIVIDE(SalesData[Sales CY], SalesData[QTY CY])

 

I've now added another calculated column that I'd like to do an ABC analysis of based on average sales. I used the following formula here:

 

ABC =

IF(SalesData[Average Retail Price]>9,"A",

IF(Sales Data[Average Retail Price]>8,"B",

IF(Sales Data[Average Retail Price]>7,"'C","D"

)))

 

Now I get the error message:

<ccon>A ring dependency was detected: SalesData[Average Retail Price], SalesData[ABC], SalesData[Average Retail Price].</ccon>

 

Can someone tell me what exactly my error is?

Many Thanks.

Anika

  • Right, so there's the problem.

    I think the first thing to say is that calculated columns should not use measures.  That is not good practice.  The next thing to do is find a solution for the issues here.

    Maybe you can rewrite Average Retail Price without using measures (it's possible that circular dependency errors will continue since I haven't seen your data or model)) or do it in Power Query.

    I think those are good starts.

4 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    Are we getting the full information here?

    Is Average Retail Price column using  measures or calculated columns or 'normal' columns?

    • Anika3186's avatar
      Anika3186
      Frequent Visitor

      The Average Retail Price column is a calculated column, I created: DIVIDE(SalesData[Sales CY], SalesData[QTY CY])

       

      And this calculated column uses measures in the formula (Sales CY & QTY CY are measures)

  • HotChilli's avatar
    HotChilli
    Community Champion

    Right, so there's the problem.

    I think the first thing to say is that calculated columns should not use measures.  That is not good practice.  The next thing to do is find a solution for the issues here.

    Maybe you can rewrite Average Retail Price without using measures (it's possible that circular dependency errors will continue since I haven't seen your data or model)) or do it in Power Query.

    I think those are good starts.

    • Anika3186's avatar
      Anika3186
      Frequent Visitor

      I changed it and know it works! 🙂

       

      Thanks a lot!