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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SHOOKANSON
Advocate I
Advocate I

Circular Dependency - Simple Fix?

Hi all,

 

I am having an issue which I hope there is a simple fix for. I am trying to create two calculated columns (I cannot use measures because I need it to calculate row by row) - a sell column and a cost column.

 

When using these functions:

SELL = CALCULATE(SUM[SELL])*CALCULATE(SUM[QTY])

COST = CALCULATE(SUM[COST])*CALCULATE(SUM[QTY])

 

I keep getting a circular dependency error - I assume because I am trying to use the quantity in both columns. I tried adding an index column, but that did not solve my issue. I hope there is a simple fix to this that I just cannot find?

 

Thanks!!!

1 ACCEPTED SOLUTION
Interkoubess
Solution Sage
Solution Sage

Hi @SHOOKANSON,

 

If you want to compute row by rows, then you can use SUMX.

 

SO for example in your case, you can have 

SELL = Sumx( Table, SELL*QTY)

COST=SUMX(Table, COST*QTY)

 

Please give a sample if you keep having trouble with the formulas,

 

Ninter

View solution in original post

2 REPLIES 2
Interkoubess
Solution Sage
Solution Sage

Hi @SHOOKANSON,

 

If you want to compute row by rows, then you can use SUMX.

 

SO for example in your case, you can have 

SELL = Sumx( Table, SELL*QTY)

COST=SUMX(Table, COST*QTY)

 

Please give a sample if you keep having trouble with the formulas,

 

Ninter

I knew I was missing something simple! Thanks! 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.