Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Getting a Circular Dependency Error in relationship when using 2 concatenated Columns of 2 tables

Hello Everyone,

 

I have two tables and I am trying to create a relationship between these two tables with the best possible scenario.

 

Please refer to the tables below:

 

Table 1     Table 2    
Vendor NameYearMonthConc_AConc_B Vendor NameYearMonthConc_CConc_D
ABC2020JanABC2020JanABC2020Jan ABC2020JanABC2020JanABC2020Jan
CDE2020FebCDE2020FebCDE2020Feb CDE2020FebCDE2020FebCDE2020Feb
EDF2020MarchEDF2020MarchEDF2020March EDF2020MarchEDF2020MarchEDF2020March
HGH2021AprHGH2021AprHGH2021Apr HGH2021AprHGH2021AprHGH2021Apr
HGH2021AprilHGH2021AprilHGH2021April HGH2021AprilHGH2021AprilHGH2021April
HGH2021MayHGH2021MayHGH2021 HGH2021JanHGH2021JanHGH2021
HGH2021MayHGH2021MayHGH2021 HGH2021FebHGH2021FebHGH2021
HGH2021JunHGH2021JunHGH2021 HGH2021MarHGH2021MarHGH2021
HGH2021JuneHGH2021JuneHGH2021 HGH2021AprHGH2021AprHGH2021

 

a. First I created a Custom Column in each table concatenating Vendor Name, Year and Month. In table 1 its Conc_A, In Table 2 its Conc_C. However two rows wont get connected because in Table 2, Row 3 and Row 4 have a different Month.

 

b. So I created one more Custom Column in each table using Lookup Dax to use Vendor Name, Year and Month concatenation where ever this combination matches between two tables and where it doesnt match just concatenate Vendor Name and Year. So I created Conc_B and Conc_D with the best possible scenario where it matches all rows. Now when I want to create a relationship between these two table I am getting a Circular Dependency Error. 

 

Can someone please help in understanding this error and what is causing the Circualar Dependency error and how do we rectify it

 

The screenshots below are from the actual data I am working on

 

 

 

 

Regards,

Vamshi Regalla 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hello All,

    I Figured it out. The reason it was showing a Circular dependency is because the combination in Column Conc_D was repeating. 

     

    To address this I created a Subset Table - Table 3 with Unique Values of Column Conc_D and then linked Table 1 with Table 3.  there were no circular Dependencies this time as Conc_D had unique values.

     

    Regards,

    Vamshi Regalla 

     

4 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi,  Anonymous 

    If the calculated column B of Table1 and the calculated column C of Table2 are created based on the same column A1 in table1, it is not recommended to establish a relationship between column B and column C.

     

    Best Regards,
    Community Support Team _ Eason

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you. is there a workaround to establish relationship between these two tables considering 3 columns( vendor Name, Yeaar and Month) from each table 

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi,  Anonymous 

        Take a try to  convert the calculated column B of Table1 into a actual column, for example, create a custom column B2 in 'Transform Data' to associate the corresponding fields. 

         

        Best Regards,
        Community Support Team _ Eason

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello All,

    I Figured it out. The reason it was showing a Circular dependency is because the combination in Column Conc_D was repeating. 

     

    To address this I created a Subset Table - Table 3 with Unique Values of Column Conc_D and then linked Table 1 with Table 3.  there were no circular Dependencies this time as Conc_D had unique values.

     

    Regards,

    Vamshi Regalla