Forum Discussion

andrea_chiappo's avatar
andrea_chiappo
Helper III
6 years ago

Two identically calculated columns, one circular dependency error message

I have (among other) the following two tables: DimGroups[groupID] <-> DimGroupsUsers[groupID]  

where the arrow indicates that there's a two-way relationship linking the tables via the dimension [groupID]  

 

DimGroups

   

DimGroupsUsers

 

I first created a fatherGroupID column in DimGroupsUsers using the following formula 

 

fatherGroupID = LOOKUPVALUE(DimGroups[fatherGroupID], DimGroups[groupID], DimGroupsUsers[groupID])  
 
This worked correctly (as can be seen in the second snapshot).  
However, when I repeated the same formula to create a second column copying the description field from the first,  
using the following  
 
fatherContextName = LOOKUPVALUE(DimGroups[description], DimGroups[groupID], DimGroupsUsers[groupID])  
 
so changing only the fatherGroupID -> description , I get the circular dependency error.  
 
I even tried producing an identical column to the first, changing only the name (and keeping fathergroupID),   
but I always get the circular denpendency error.  
 
Why is this and how can I remedy? Thank you
 
UPDATE
I feel that I need to use function RELATED somehow, but I can't figure out how 

2 Replies

    • andrea_chiappo's avatar
      andrea_chiappo
      Helper III

      there is already a many-to-one relationship

       

      but the following   

      fatherGroupDescription = LOOKUPVALUE(DimGroups[description], DimGroups[groupID], RELATED(DimGroupsUsers[groupID]))  
      returns an error  
       
      Yet, I don't understand why creating a column using LOOKUPVALUE the first time works, while the second it doesn't