Forum Discussion

MJMB's avatar
MJMB
New Member
3 years ago

Circular dependency calculation

Hello everybody!

I have a table with the status of several equipments (Correct or Incorrect) and the dependency between them. So, the "real status" of each equipment must be calculated based on the "real status" of the other but that gives a circular dependency.

 

EquipmentStatusDependency 1Dependency 2Dependency 3
1Incorrecto32 
2Correcto548
3Correcto72 
4Correcto8  
5Correcto317
6Correcto27 
7Correcto62 
8Correcto9  
9Incorrecto1  

 

How can I solve this in Power Bi?

5 Replies

  • MJMB's avatar
    MJMB
    New Member

    HI! Thank you for your response. The real status has to be calculated considering that if the status of the first, second and third dependency is "Incorrect", then it is "incorrect". But it has to be an iterative calculation because the "real status" changes based on the status of the dependent equipment.


    EquipmentStatusDependency 1Dependency 2Dependency 3Real status
    1Incorrecto32 Incorrecto
    2Correcto548Correcto
    3Correcto72 Correcto
    4Correcto1  Incorrecto
    5Correcto317Correcto
    6Correcto27 Correcto
    7Correcto62 Correcto
    8Correcto9  Incorrecto
    9Incorrecto1  Incorrecto
    • lbendlin's avatar
      lbendlin
      Super User

      I still don't understand what the expected outcome is based on your sample data. Can you please indicate that?

      • MJMB's avatar
        MJMB
        New Member

        Maybe a short example is better to explain:

        - Equip A is incorrect. 
        - Equip B is correct but its status depends on the equip A status. 
        - Equip C is correct but its status depends on the equip B status. 

        So, in a first calculation I can determine a new column of status and the result will be:

        - A incorrect 

        - B incorrect (because of the dependency with A)

        - C correct (because the last known status of equip B is correct)

         

        In a second calculation, the result must be the desired one:

        - A incorrect

        - B incorrect

        - C incorrect

         

        But I have multiple equipments and multiple dependencies. 

        thanks!