cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

"A circular Dependency was detected" error while creating a calculated column

Hi,

 

 I am trying to create a table visualization in Power BI. Where I am showing sales by category and target %. Now I am creating 2 calculated columns in it. The first column tells me Yearly Sales target. Which is as below:

 

 Yearly Sales Target = (1 + Target%) * [Yearly Sales].

 

This is working fine. But when I am trying to create a new column for monthly sales target with the formula as below:

 

Monthly Sales Target = (1 + Target%) * [Monthly Sales].

 

I am getting the error as "A circular Dependency was detected".

 

Any suggestions on how to remove this error?

 

Thanks,

Siddhant

1 ACCEPTED SOLUTION

Accepted Solutions
malagari Member
Member

Re: "A circular Dependency was detected" error while creating a calculated column

This is a good refresher on circular dependencies: https://www.sqlbi.com/articles/understanding-circular-dependencies/.

 

In your case, Power BI does not allow to have two calculated columns that contain measures that are also based on that table.  In order to understand why, you'd need a better understanding of what's going on under the hood.

 

In order to get around it, you should try turning these into measures that reference the [Yearly Sales] and [Monthly Sales] measures.

Dan Malagari
Consultant at Headspring

View solution in original post

4 REPLIES 4
malagari Member
Member

Re: "A circular Dependency was detected" error while creating a calculated column

This is a good refresher on circular dependencies: https://www.sqlbi.com/articles/understanding-circular-dependencies/.

 

In your case, Power BI does not allow to have two calculated columns that contain measures that are also based on that table.  In order to understand why, you'd need a better understanding of what's going on under the hood.

 

In order to get around it, you should try turning these into measures that reference the [Yearly Sales] and [Monthly Sales] measures.

Dan Malagari
Consultant at Headspring

View solution in original post

Re: "A circular Dependency was detected" error while creating a calculated column

@malagari Thanks for the solution.

Highlighted
sgovindarajan Frequent Visitor
Frequent Visitor

Re: "A circular Dependency was detected" error while creating a calculated column

@siddhantk989 @malagari I am facing the same issue. How did you solve this?

Re: "A circular Dependency was detected" error while creating a calculated column

Hi @sgovindarajan

 

 This solution from Dan actually helped me with the error:

 

This is a good refresher on circular dependencies: https://www.sqlbi.com/articles/understanding-circular-dependencies/.

 

In your case, Power BI does not allow to have two calculated columns that contain measures that are also based on that table.  In order to understand why, you'd need a better understanding of what's going on under the hood.

 

In order to get around it, you should try turning these into measures that reference the [Yearly Sales] and [Monthly Sales] measures.

Dan Malagari
Consultant at Headspring

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors