- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

# Circular Dependency - Simple Fix?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-28-2017 09:01 AM

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!!!

Solved! Go to Solution.

Accepted Solutions

## Re: Circular Dependency - Simple Fix?

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-28-2017 10:07 AM - edited 09-28-2017 10:08 AM

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

All Replies

## Re: Circular Dependency - Simple Fix?

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-28-2017 10:07 AM - edited 09-28-2017 10:08 AM

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

## Re: Circular Dependency - Simple Fix?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-28-2017 10:52 AM

I knew I was missing something simple! Thanks!