Forum Discussion
SummaL
4 years agoNew Member
How to fixe: A circular dependency was detected
I have a Calendar table like below. Only the last two columns are calculated columns. Column "IsCurrentMonth " is working fine, DAX as below. IsCurrentMonth = var currentromonth = 'Calenda...
- 4 years ago
Hi, SummaL
I can reproduce the same error.
I don't know what exactly causes this error, but after encapsulating the condition with ‘filter’, the code can run normally.
IsCurrentWeek = VAR currentrowweek = 'Calendar'[Fiscal_Week] VAR iscurrentweek = CALCULATE ( MIN ( 'Calendar'[Fiscal_Week] ), FILTER ( 'Calendar', 'Calendar'[DATE] = TODAY () ) ) RETURN IF ( iscurrentweek = currentrowweek, "Yes", "No" )Best Regards,
Community Support Team _ Eason
v-easonf-msft
Community Support
4 years agoHi, SummaL
I can reproduce the same error.
I don't know what exactly causes this error, but after encapsulating the condition with ‘filter’, the code can run normally.
IsCurrentWeek =
VAR currentrowweek = 'Calendar'[Fiscal_Week]
VAR iscurrentweek =
CALCULATE (
MIN ( 'Calendar'[Fiscal_Week] ),
FILTER ( 'Calendar', 'Calendar'[DATE] = TODAY () )
)
RETURN
IF ( iscurrentweek = currentrowweek, "Yes", "No" )
Best Regards,
Community Support Team _ Eason