Forum Discussion
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.
| Equipment | Status | Dependency 1 | Dependency 2 | Dependency 3 |
| 1 | Incorrecto | 3 | 2 | |
| 2 | Correcto | 5 | 4 | 8 |
| 3 | Correcto | 7 | 2 | |
| 4 | Correcto | 8 | ||
| 5 | Correcto | 3 | 1 | 7 |
| 6 | Correcto | 2 | 7 | |
| 7 | Correcto | 6 | 2 | |
| 8 | Correcto | 9 | ||
| 9 | Incorrecto | 1 |
How can I solve this in Power Bi?
5 Replies
- lbendlinSuper User
What is the expected outcome based on your sample data?
- MJMBNew 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.
Equipment Status Dependency 1 Dependency 2 Dependency 3 Real status 1 Incorrecto 3 2 Incorrecto 2 Correcto 5 4 8 Correcto 3 Correcto 7 2 Correcto 4 Correcto 1 Incorrecto 5 Correcto 3 1 7 Correcto 6 Correcto 2 7 Correcto 7 Correcto 6 2 Correcto 8 Correcto 9 Incorrecto 9 Incorrecto 1 Incorrecto - lbendlinSuper User
I still don't understand what the expected outcome is based on your sample data. Can you please indicate that?
- MJMBNew 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!