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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.