Forum Discussion
Anonymous
3 years agoNot applicable
Calculated columns - Circular dependencies
Avg_ob_load_distinct = sumx(DISTINCT(Crossdock[LD_LEG_ID]), FIRSTNONBLANK(Crossdock[AVG_OUTBOUND_LOAD],0))
Avg_ib_load_distinct = sumx(DISTINCT(Crossdock[LD_LEG_ID]), FIRSTNONBLANK(Crossdock[AVG_INBOUND_LOAD],0))
Avg_ib_load_distinct is an existing calculated column and I am trying to create another similar one Avg_ob_load_distinct but I get the error message - "A circular dependency was detected: Crossdock[Avg_ob_load_distinct], Crossdock[Avg_ib_load_distinct], Crossdock[Avg_ob_load_distinct]."
AVG_OUTBOUND_LOAD is a column in my dataset. Ld_LEG_ID refers to the load ID which is not unique. I am trying to get the distinct average load for each Ld_LEG_ID.
Example - Ld_LEG_ID AVG_OUTBOUND_LOAD
111234 1678
111234 1678
111234 1678
166565 1678
166765 1678
77777 5676
Goal - Avg_ob_load_distinct = 1678+1678+5676 /3
Currently it is adding all the avergaes
166765 1678
77777 5676
Goal - Avg_ob_load_distinct = 1678+1678+5676 /3
Currently it is adding all the avergaes
2 Replies
- lbendlinSuper User
If it is a calculated column then you may be able to push that into Power Query instead (with the added benefit that this avoids circular references).
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - Ashish_MathurSuper User
Hi,
Write these measures
AOL = min(Crossdock[AVG_OUTBOUND_LOAD])
Average AOL = AVERAGEX(VALUES(Ld_LEG_ID),[AOL])
Hope this helps.