Forum Discussion
Why USERELATIONSHIP causes circular dependency?
Hi Anonymous
Thank you for the article. I read it before I wrote this post and that articles is precisely the one that tells me that USERELATIONSHIP should not generate the circular dependency. Look:
Table1[Cantidad Pendiente] depends on {
- Table1,
- Table1[qtyOrdered]
- Table1[Cantidad Asignada]
}
Table1[Cantidad Asignada] depends on {
- Table1,
- Table2,
- Table1[Item],
- Table2[Row Number],
- Table2[qtyAssigned]
- Relationship between Table1 and Table2
}
So where is the circular dependency and why if I acivate the relationship and just sum
'Table1'[Cantidad Asignada] = CALCULATE(SUM(Table2[qtyAssigned]))it works perfectly. Why USERELATIONSHIP creates a circular dependency? I just want to understand (amitchandak thank you! but this time I don't need an alternative way to solve the problem, I just want to understand the reason).
Hi juan_pablo,
I think it may be related to calculating the column processing mechanism. AFAIK, calculate fields(column/table) are hosted and processed on data model table levels.
For the USERELATIONSHIP function, it should create and invoke a virtual relationship that not really existed in your tables to calculate.
If you only try to use this in the calculated column to do some common calculations it should work well. When you try to use this field to calculate with static table field values, the current table may be interacted or integrated with the template virtual table contents.
Then power bi will try to mapping or analysis between these contents which may be caused the deadlock or unlimited iteration looping. (power bi will trace these type of operations, they will be ignored/canceled by the internal processing logic and send the notification message about these type of errors)
Notice: above are some thought of this scenario, I also not ensure if these surmise fully followed the AS tabular engine logic.
Perhaps matt can share some additional content for this.MattAllington any insight about this scenario?
Regards,
Xiaoxin Sheng