Circular Dependency: How to solve it easily

MrAustria

New Member
Joined
Jan 25, 2021
Messages
9
Office Version
  1. 365
Platform
  1. Windows
After my inital problems and my first trials with PowerBI, I am quite satisfied with the result. Finally, I am facing one last problem - and I have not found any solution therefore: circular dependency

Table "Sales"
S = Sales
X. = Price reduction
TypePriceYear
X1-102019
X1-52020
X2-42020
X302019
X3-32019
X3-52019
S502019
S302020
S402019
S252020

Table "Price codes"
TypeDescriptionMaximum number of voucher
X1General discount50
X2Annual discount10
X3Christmas discount5


Result: when using slicer for 2020

TypeDescriptionSum of reductionCountAverage (Sum / Count)Achieved (Count / Maximum Number of voucher)
X1General discount-51-52%
X2Annual discount-41-410%
X3Christmas discount0000%

The calculations were being made by using Measures.
When calculation the Column "Achieved", I always get a circular dependency as a result. How can I easily solve and avoid this problem?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
What are your formulas? Where are they?

Trying to replicate what you are providing : error message on renaming table to Price codes : "space are not allowed"
Fine with Price_codes.

I see your Christmas discount calculations are all 0. This looks there may be a division by 0 on this line.
 
Upvote 0
My formulas are in table "Sales".

Yes, the christmas discounts are all 0 when selecting Year 2020.
 
Upvote 0
SumOfReduction = Calculate(Sum('Sales'[Price]);('Sales'[Price]<0);PriceCodes[Type]<>0)
Count = Calculate(Count('Sales'[Price]);'Sales'[Price]<0)
Average = Divide([SumOfReduction];[Count])

These formulas work properly, I just have a circular dependency with the following one:
Achieved = Divide([Count];[MaximumNumberOfVoucher])

How could I solve the circular dependency in the last formula?
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top