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
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
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.