cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

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

Accepted Solutions
Highlighted
Solution Sage

## Re: Circular Dependency - Simple Fix?

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

2 REPLIES 2
Highlighted
Solution Sage

## Re: Circular Dependency - Simple Fix?

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

Highlighted
Frequent Visitor

## Re: Circular Dependency - Simple Fix?

I knew I was missing something simple! Thanks!

Announcements

#### August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

#### July 2020 Community Highlights

Learn about the exciting things that happened in July.

#### Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

#### Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.