Forum Discussion

Borjaveigasvh's avatar
Borjaveigasvh
Regular Visitor
6 years ago
Solved

Problema con referencia circular

Buenos días, 

 

estoy creando dos columnas calculadas en una tabla y siempre que hago la segunda me dice que tiene referencia circular cuando no veo la relacion entre ellas. Me podeis echar uan mano con esto?

Esta es la primera que pongo:

Rep. fchaactual =
CALCULATE (
MAX ( CCAA_PRICE_HOUSING_EVOLUTION[PRICE_M2] );
FILTER (
RELATEDTABLE ( CCAA_PRICE_HOUSING_EVOLUTION );
RELATED ( 'CCAA dimension'[ID_CCAA_INE]) = CCAA_PRICE_HOUSING_EVOLUTION[ID_CCAA_INE]
);
FILTER (
RELATEDTABLE ( CCAA_PRICE_HOUSING_EVOLUTION );
MAX ( CCAA_PRICE_HOUSING_EVOLUTION[DATE_PRICE] )=CCAA_PRICE_HOUSING_EVOLUTION[DATE_PRICE]
)
)

La segunda que creo:

 

Rep.fechaventa Appraisal =
IF(
'Output'[Date of Appraisal] < DATE ( 2006; 1; 1 );
CALCULATE (
MIN ( CCAA_PRICE_HOUSING_EVOLUTION[PRICE_M2] );
FILTER (
RELATEDTABLE ( CCAA_PRICE_HOUSING_EVOLUTION );
RELATED ( 'CCAA dimension'[ID_CCAA_INE] ) = CCAA_PRICE_HOUSING_EVOLUTION[ID_CCAA_INE]
)
);
CALCULATE (
MAX ( CCAA_PRICE_HOUSING_EVOLUTION[PRICE_M2] );
FILTER (
RELATEDTABLE ( CCAA_PRICE_HOUSING_EVOLUTION );
MONTH ( EARLIER ( Output[Date of Appraisal]) )
= MONTH ( CCAA_PRICE_HOUSING_EVOLUTION[DATE_PRICE] )
&& YEAR ( EARLIER ( Output[Date of Appraisal] ) )
= YEAR ( CCAA_PRICE_HOUSING_EVOLUTION[DATE_PRICE] )
);
FILTER (
RELATEDTABLE ( CCAA_PRICE_HOUSING_EVOLUTION );
RELATED ('CCAA dimension'[ID_CCAA_INE]) = CCAA_PRICE_HOUSING_EVOLUTION[ID_CCAA_INE]
)
))

 

 

El mensaje de error que aparece es: "Se detecto una cependencia cisrcular 'TABLA'[Columna],'TABLA'[Rep. fechaactual],Output[Columna]

 

Muchas gracias 

  • Thanks for sharing, I found the problem, it was in how my tables had the relation created. 

     

    I had selected both in one of the tables that needed to be single, and was creating the circular problem.

     

    Best

    Borja 

4 Replies

    • Borjaveigasvh's avatar
      Borjaveigasvh
      Regular Visitor

      But do you know howcome those two calculated columns create a circular reference? their calculation is not dependent on the previous column so I do not understand the reason.

       

      Thanks for sharing knowledge

       

      Regards

      Borja 

       

       

    • Borjaveigasvh's avatar
      Borjaveigasvh
      Regular Visitor

      Thanks for sharing, I found the problem, it was in how my tables had the relation created. 

       

      I had selected both in one of the tables that needed to be single, and was creating the circular problem.

       

      Best

      Borja