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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
makhdoomliaqat
Frequent Visitor

A circular dependency was detected

Hi,

i am new on powerbi. i am getting this error. Here is below my table.

GNameYear Opening Stock  InQty  initemvaluee  Average Value  Closing Stock Value  Opening Stock Value 
Bahria Town2020        4,454        126,610,300             28,426               24,673,943                                  -  
Bahria Town2021                   868       6,379        166,903,972             23,031               16,121,537                                  -  

 

 

I am taking average from below dax

 

Average Value = (([initemvaluee]+[Opening Stock Value])/([inqtyy]+[Opening Stock]))

 

 

i want the closing stock value previous year in the field of opening stock value. but it gives me error of 

 

 

A circular dependency was detected

 

Please help how it will 

 

 

7 REPLIES 7
V-lianl-msft
Community Support
Community Support

Do you call measure when you create a calculated column?Maybe you could consider creating a measure or re creating the corresponding calculated column from the previous measure

i have tried all but all in vain if you want the file i am attaching.
https://www.mediafire.com/file/pmb7u1thsag1kq1/Cost_of_goods_sold.pbix/file 

I checked the file you provided and found no errors. Has the problem been solved?

PaulDBrown
Community Champion
Community Champion

This video from the gurus at SQLBI will probably prove useful:





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






makhdoomliaqat
Frequent Visitor

i used your formula 

makhdoomliaqat_0-1632529417710.png

 

 

getting same error

 

makhdoomliaqat_1-1632529475321.png

 

hnguy71
Memorable Member
Memorable Member

Try this instead:

 

AvgValue = 
VAR _a = [ initemvaluee ] + [ Opening Stock ]
VAR _b = [ InQty ]+[ Opening Stock ]
RETURN
DIVIDE(_a, _b)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

I have tried your formula but it give same error

makhdoomliaqat_0-1632530137877.png

 

 

makhdoomliaqat_1-1632530168287.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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