Forum Discussion
Remove circular dependency from calculated column
Hello, I have converted an excel formula into a calculated column. This calculated column (Lookup Customer Sector) produces the exact results I need, which is combining the sector from multiple tables based on various fields into one spot.
I'm newer to PBI and the easiest way for me to validate & create this column was by using variables.
The problem I am running into is that I need to use this calculated column to join with another table, but when I go to make the relationship I get the error that 'Lookup Customer Sector' can't be used due to circular dependencies.
Can someone please help me figure out a way to write this calculated column that removes the circular dependencies?
This is what the field looks like and gets used in visuals with other fields such as item number, end customer, bill to customer, etc.
thanks in advance!
Because calculated column uses LOOKUPVALUE across tables that are related to same table creating a dependency loop.
So, do not use a calculated column and convert it into a measure or power query column. Move this logic to power query, merge tables step by step like your VAR logic and create the column there
5 Replies
- krishnakanth240Super User
Because calculated column uses LOOKUPVALUE across tables that are related to same table creating a dependency loop.
So, do not use a calculated column and convert it into a measure or power query column. Move this logic to power query, merge tables step by step like your VAR logic and create the column there
- lbendlinSuper User
I have converted an excel formula into a calculated columnDon't do that. Power BI is not Excel. Formulate the business problem and then design a native solution based on Power BI's capabilities.
As krishnakanth240 mentioned one of the recommended approaches to get rid of the circular dependency is to push that column generation up into Power Query.
- Winter_king94Helper I
thank you! I will work on moving this over to Power Query
- krishnakanth240Super User
You're welcome Winter_king94! Sure
- Ashish_MathurSuper User
Hi,
Share data in a format that can be pasted in an MS Excel file. Show the expected result very clearly. Explain the business logic clearly.