Forum Discussion

utsavlexmark's avatar
utsavlexmark
Helper III
7 years ago

Issues with Circular Dependency

Let me first explain fields of my dash board with the image.

 

 

  1. “partnumber” - Partnumber of the product
  2. “mktname” - is the name of the product
  3. “CW” – is a calculated metrics and it shows the number of units sold in current week. Value of this field changed based on the selection in “week” slicer.
  4. “AWS” – is a calculated metrics and it is related with the metric “CW”.
  5. Next 4 are general columns.
  6. “WOS” – is a calculated metric that derived data from other two calculated metrics.
  7. “Demand” – is a calculated metric that derived data from another calculated metric and one general column.
  8. “QTY Needed” - is a calculated metric that derived data from other two calculated metrics.
  9. “DPI v1 and DPA v1” – two calculated columns; related with two general columns and one metrics.

 

Now let’s come to the point where I am stuck; I want to display a field where the data will be shown based on the “DPI v1 and DPA v1” as follows:

  • If DPI v1 and DPA v1 both are “Y” or “YES”; the value will be “In”.
  • If any of DPI v1 or DPA v1 is “N” or “NO”; the value field will be left as Blank
  • If both DPI v1 and DPA v1 are “N” or “NO”; the value will be “Out”.

Whenever I am trying to fulfill these conditions it is showing me an error as “circular dependency”. Please help me to solve this issue. With this dashboard I am getting help in some stages from this forum – hopefully it will continue like that.

 

Please let me know if you need anymore information.

Regards

Utsav

3 Replies

  • tex628's avatar
    tex628
    Community Champion

    Can you share the calculation you are trying to use?

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi utsavlexmark ,

     

    In your case, Power BI does not allow to have two calculated columns that contain measures that are also based on that table.  In order to understand why, you'd need a better understanding of what's going on under the hood.

    In order to get around it, you should try turning these into measures

     

    BTW, you can refer to the third - party blog to know more about Circular Dependency.

    https://www.sqlbi.com/articles/understanding-circular-dependencies/

    • utsavlexmark's avatar
      utsavlexmark
      Helper III

      Sorry to the coumunity; I kept this thread open - as I was trying to solve this issue. 

      As you all know that it is not possible to over come the circular dependency; I have just changed the way to display the data. I am sucessful in that - but need help for another issue in the same dashboard.

       

      One of my Conditinal Column is containing two types of values in it, "IN" and "OUT". Now I want one Measure/Column (as I am not sure what should be applicable here) to display total number of "IN" and one to display total number of "OUT".

       

      Hope I am clear with my issue.

      Regards

      Utsav