Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
aJ2
Helper I
Helper I

Circular Dependency when not using calculated function

Hi everyone.

 

Initially after encountering this error, I figured out that using calculated was the main source of this problem, I took another route and then used 'IF' to get the values. 

But when I am using the two calculated columns to create another column, I encountered this error.

Following are the calculated columns:-

 

1. revenue gross = IF(order_items[is_item_gross], [revenue all], 0) // calculated column

2.  revenue net = IF(order_items[is_item_net], order_items[revenue gross], 0) // calculated column

3. rev progress = IF(order_items[is_item_in_progress], order_items[revenue net],0) // calculated column 

4. rev inprogress shipped = [% shipped2] * order_items[revenue in progress] //calculated column

5.  orders sold = IF(order_items[is_item_sold],order_items[order gross],0) // calculated column

6. order gross = IF(AND(order_items[orders all], order_items[is_item_gross]),1,0) // calculated column

7. 

% shipped2 =
var progress_order = CALCULATE([orders sold], order_items[is_item_in_progress], order_items[delivery_status]="Shipped", order_items[status]="Shipped")/*IF(AND(VALUES(order_items[is_item_in_progress]), AND(VALUES(order_items[is_item_gross]), VALUES(order_items[delivery_status])="Shipped")), [orders gross],0)*/
var in_progress_order = CALCULATE([orders sold], order_items[is_item_in_progress])/*IF(VALUES(order_items[is_item_in_progress]), [orders gross],0)*/

return (DIVIDE(progress_order,in_progress_order))// measure

 

8. rev progress not shipped = VALUE(order_items[rev progress]) - VALUE(order_items[rev inprogress shipped])// calculated column and error "A circular dependency was detected: order_items[rev inprogress shipped], order_items[rev progress not shipped], order_items[rev inprogress shipped]" // calculated column

 

 

Kindly guide.

 

Regards

aJ2

1 ACCEPTED SOLUTION

@v-chuncz-msft,

 

Thanks for the reference.

I altered my approach. To calculate the column 'rev progress not shipped', I created local variables in the calculated column and then used the local variables in the calculation. 

 

rev progress not shipped = 
var progress_order = IF(AND(order_items[is_item_in_progress], sales_order_items[status]="Shipped"), sales_order_items[orders sold],0)
var in_progress_order = IF(order_items[is_item_in_progress], order_items[orders sold],0)
var shipped = DIVIDE(progress_order,in_progress_order)
var inprog_shipped = shipped * order_items[rev progress]
 
return (order_items[rev progress] - inprog_shipped)

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@aJ2,

 

You may take a look at the following articles.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft,

 

Thanks for the reference.

I altered my approach. To calculate the column 'rev progress not shipped', I created local variables in the calculated column and then used the local variables in the calculation. 

 

rev progress not shipped = 
var progress_order = IF(AND(order_items[is_item_in_progress], sales_order_items[status]="Shipped"), sales_order_items[orders sold],0)
var in_progress_order = IF(order_items[is_item_in_progress], order_items[orders sold],0)
var shipped = DIVIDE(progress_order,in_progress_order)
var inprog_shipped = shipped * order_items[rev progress]
 
return (order_items[rev progress] - inprog_shipped)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors