Forum Discussion

SummaL's avatar
SummaL
New Member
4 years ago
Solved

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...
  • v-easonf-msft's avatar
    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