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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Circular dependency

Hello,

can someone help me solve circular depenedncy issue? it is confusing because i am not referring to the culomn at all. 
So i want to calculate the number of rows in my table in a cumulative manner for each date. example

ID     date                             Cumulative_number 

0      01.01.2020 09:00            1

1      01.01.2020 10:00            2

2      05.05.2020  10:00           4

3      05.05.2020  10:00           4

 

 

I have the formula which was actually working but i changed the data source and suddenly it is not working. 

 

Cumulative number= CALCULATE ( [count all IDs], FILTER ( ALL( table), table[date] <= EARLIER ( table[date] ) ) )
 
 
Any suggestions on how I can solve the issue?
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lbendlin_0-1714675683090.png

This is a calculated column.

RT rows = 
var d = [date]
return COUNTROWS(filter('table',[date]<=d))

Let me know if you need this as a measure.

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

lbendlin_0-1714675683090.png

This is a calculated column.

RT rows = 
var d = [date]
return COUNTROWS(filter('table',[date]<=d))

Let me know if you need this as a measure.

Anonymous
Not applicable

Thank you this resolves my issue! 
I have another culomn that gives the same error. It seems that the calculate (x, filter)) is causing the circular dependency!


ID     date                             Cumulative_number   date2               burndown

0      01.01.2020 09:00            1                               02.02.2020 10:00     1

1      01.01.2020 10:00            2                               02.02.2020 11:00     2

2      05.05.2020  10:00           4                               06.05.2020 09:00     2

3      05.05.2020  10:00           4                                Blank                      2     
4      06.05.2020  11:00           5                               07.05.2020 11:00     3

 



Burndown =
VAR CurrentDate = table[date]
VAR cumulativeNumber = table[Cumulative Number] (Which now doesn't have circular dependency anymore)
var PreviousDate=
    CALCULATE(
        MAX(table[date2]),
        FILTER(
            table,
            table[date2] <= CurrentDate
            && NOT(ISBLANK(table[date2]))
        )
    )
    RETURN
    cumulativeNumber -
    COUNTROWS(
        FILTER(
            table,
            NOT(ISBLANK(table[date2])) &&
            table[date2] <= PreviousDate
        )
    )

Any idea how i can change my formula to avoid the circular dependency?
Anonymous
Not applicable

I did a little workaround. 
I created the columns like this 

 

Cumulative date2=
VAR d = table[date]
RETURN
    SUMX(
        FILTER(
            table,
            table[date2] <= d && NOT(ISBLANK(table[date2]))
        ),
        1
    )


burndown = cumulative number- cumulative date2

 


but it is extremely slow whether I use countrows or sumx with 1.  and I get a memory max error. Any workarounds in mind?

 

    

 

 

 

lbendlin_0-1715300357717.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.