- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Consultant at Headspring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have encountered a circular depenndency in the following piece of code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The entities involved in dependencies are tables, columns, and relationships. Each of these objects might depend on other objects. For example, a table might depend on a relationship, a column might depend on a table, and so on.
These are the two basic rules (a third rule will come later):
- An expression depends on all the columns, tables and relationships used in the expression.
- A relationship depends on the columns used for the relationship itself.
Try to create measures instead of creating calculated columns.
Full Stack Business Intelligence Consultant @Capgemini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I created meaures but needed to create a column as we cannot use measures directly in legend.
So what if I have to use the measures in a legend then how to use it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Consultant at Headspring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I have a similar issue. I'm working on a report to calculate the Opening Balance on a daily bases. after the expenses are deducted, we have a closing balance. so, for the day 2 opening balance, we want to use the day 1 closing balance. after all deductions for day 2 as well, we want the day 3 Opening balance to be the day 2 closing balance. e.t.c.
I'm not sure of a way to approach this, but our opening balance will have to be = yesterday's closing balance, and our closing balance is calculated as opening balance - expenses. the circular dependency error will surely occur.
Can anyone assist??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @malagari that has saved me on a report i am doing. Been pulling my hair out until i read that article, problem now solved. 😄
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Consultant at Headspring

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-05-2024 06:43 PM | |||
11-10-2022 04:29 AM | |||
09-29-2021 12:51 AM | |||
06-05-2023 03:06 AM | |||
07-10-2023 11:47 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |