Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sentsara
Helper II
Helper II

CIRCULAR Dependency issue

Hi Team,

1) created RecentForecastRate Measure in _QBACompletionFactor_RecentMonth Dataset and it worked

RecentForecastRate = _QBACompletionFactor[LatestForecastRate]
2) created caculated column for the Rank column and worked
Rank =
VAR FR = _QBACompletionFactor_RecentMonth[RecentForecastRate]
VAR rnk =
    CALCULATE (
        VALUES ( _QBABenchmark[Rank] ),
        FILTER (
            _QBABenchmark,
            _QBACompletionFactor_RecentMonth[benchmarkjoiner] = _QBABenchmark[benchmarkjoiner]
                && FR >= _QBABenchmark[Min]
                && FR <= _QBABenchmark[Max]
        )
    )
RETURN
    rnk
 
3) when i try to create below caculated column,I getting circular dependency error. can you please help on fixing the belox DAX Syntax. 
NextTierUp =
VAR next =
    CALCULATE (
        VALUES ( _QBACompletionFactor_RecentMonth[Rank] ),
        FILTER (
            _QBACompletionFactor_RecentMonth,
            _QBACompletionFactor_RecentMonth[RunMonth] = 201807
                && _QBACompletionFactor_RecentMonth[MeasureID] = "RRI"
        )
    )
VAR NextTier =
    IF ( next = 55next + 1 )
RETURN
    NextTier
1 REPLY 1
Anonymous
Not applicable

Of course you get an error because using CALCULATE enforces a context transition and if you knew anything about context transition, you'd also know that context transition puts ALL THE COLUMNS' (also the calculated ones) values of the current row in the filter context. This is how circular dependency is created behind the scenes.

Please refrain from using CALCULATE in calculated columns, especially in fact tables or you'll be sorry sooner rather than later. Instead, use FILTER only with the correct conditions.

By the way, it's a bad idea to use calculated columns in DAX. You should do it in your ETL layer, that is, in Power Query. The main reason why it's a bad idea is that calculated columns do not get good compression (there are some technical reasons why). Please, try to calculate it in Power Query.

I'd suggest you also read about CALCULATE, context transition and calculated columns in depth.

Best
Darek

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.