Forum Discussion
PI circular dependency error
Hi Varan_15 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Beyond Time Bucket =
VAR additionalday =
CALCULATE (
SUM ( 'Test'[M_Additional Hours] ),
FILTER ( 'Test', 'Test'[result] = "Beyond SLA" )
)
VAR testing =
IF (
NOT ( ISBLANK ( 'Test'[M_Additional Hours] ) ),
DIVIDE ( additionalday, 8, 0 )
)
VAR Day_Bucket =
SWITCH (
TRUE (),
testing <= 2, 2,
testing > 2
&& testing < 5, 5,
testing > 5
&& testing < 10, 10,
11
)
RETURN
IF ( NOT ( ISBLANK ( 'Test'[M_Additional Hours] ) ), Day_Bucket )
Best Regards
Anonymous ,
Thanks for your effort, please note M_additional_Hours field is a measure and when i used the same again getting same error.
as below calculated column :
Beyond Time Bucket =
VAR additionalday =
CALCULATE (
'Final'[M_Additional Hours],
FILTER ( 'Final', 'OM_TI Final'[M_SLA_Result] = "Beyond SLA" )
)
VAR testing =
IF (
NOT ( ISBLANK ( 'Final'[M_Additional Hours] ) ),
DIVIDE ( additionalday, 8, 0 )
)
VAR Day_Bucket =
SWITCH (
TRUE (),
testing <= 2, 2,
testing > 2
&& testing < 5, 5,
testing > 5
&& testing < 10, 10,
11
)
RETURN
IF ( NOT ( ISBLANK ( 'Final'[M_Additional Hours]) ), Day_Bucket )
error:
<pi>A circular dependency was detected: Final[Beyond Time Bucket].</pi>