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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alberto95
Frequent Visitor

circular dependency

hi, i've a problem with circular dependency. 

i need 2 different calculated colums. 

the first one it's a calculated colum with some if conditions (i did it without problems)

the second one is a column which contain the first calculated column in the formula. that's give me a circular error. 

 

IMPORTO_NETTO = if(VENDITE_ICG[COD_CLIENTE] = "266463IN"  && VENDITE_ICG[COD_PORTO] = "M" && VENDITE_ICG[COD_CANTIERE] = "372632" && VENDITE_ICG[VAL_TRASP]03, calculate(SUM(VENDITE_ICG[VAL_TRASP])/SUM(VENDITE_ICG[QTA])))))))
 
VAL_TRASP_1 = CALCULATE(SUM(VENDITE_ICG[QTA])*SUM(VENDITE_ICG[IMPORTO_NETTO]),(ALLEXCEPT(VENDITE_ICG,VENDITE_ICG[IMPORTO_NETTO])))
 
the structure is easy, 2 tables: data table and vendite_icg (1-n relationship)
 
 
could someone help me? 
thanks
 
 
2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Alberto95 

 

After testing, the computed column detects circular dependencies. But measure doesn't.

vzhangti_0-1672194258006.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Alberto95 , can you share excat error

 

Try like

 

VAL_TRASP_1 = CALCULATE(SUM(VENDITE_ICG[QTA])*SUM(VENDITE_ICG[IMPORTO_NETTO]),filter(VENDITE_ICG,VENDITE_ICG[IMPORTO_NETTO] = earlier(VENDITE_ICG[IMPORTO_NETTO]) ))

 

refer: https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.