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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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 carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.