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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
EaglesTony
Post Prodigy
Post Prodigy

Why am I getting a circular reference ?

Hi,

 

I have the following column created:

 

TotChildCountDonePoints =
 var curParent = ParentWithTheirIssues[Key]
 var final = CALCULATE(SUM(ParentWithTheirIssues[Issues.Story_Points_10023]),ParentWithTheirIssues[Key] = curParent && ParentWithTheirIssues[TranslatedStatus] = "Done")
 Return IF(final = BLANK(),0,final)
 
This works, now I want to display it using the following new column:
 
DoneDisplayPoints = "(" & CONVERT(ParentWithTheirIssues[TotChildCountDonePoints],STRING) & ") "
 
However, when I try this it is giving me an error ????
"A circular dependency was detected: ParentWithTheirIssues[TotChildCountDonePoints], ParentWithTheirIssues(Column), FeatureWithTheirIssues[TotChildCountDonePoints]
 
1 ACCEPTED SOLUTION

Hi @EaglesTony - Since you’re calculating the total for each parent, ensure you’re only referencing static columns rather than calculated columns that might cause loops.

TotChildCountDonePoints =
VAR curParent = ParentWithTheirIssues[Key]
VAR final =
CALCULATE(
SUM(ParentWithTheirIssues[Issues.Story_Points_10023]),
FILTER(
ALL(ParentWithTheirIssues),
ParentWithTheirIssues[Key] = curParent
&& ParentWithTheirIssues[TranslatedStatus] = "Done"
)
)
RETURN IF(final = BLANK(), 0, final)

Once you’ve created the TotChildCountDonePoints column as shown above, you can now create the DoneDisplayPoints column as a string representation of the TotChildCountDonePoints

 

calculated column:

DoneDisplayPoints =
"(" & CONVERT(ParentWithTheirIssues[TotChildCountDonePoints], STRING) & ")"

 

Hope this clear the issue.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

7 REPLIES 7
EaglesTony
Post Prodigy
Post Prodigy

Anybody got any ideas ?

 

I have this, which is good:

 

TotChildCountDoneStoryPts =
 var curParent = FeaturesWithTheirIssues[Key]
 var final =CALCULATE(SUM(FeaturesWithTheirIssues[Issues.Story_Points_10023]),FILTER(ALL(FeaturesWithTheirIssues[TranslatedStatus]),FeaturesWithTheirIssues[Key] = curParent && FeaturesWithTheirIssues[TranslatedStatus] = "Done"))
 RETURN IF(final = BLANK(),0,final)
 
I am trying to display the result as, but get the circular reference error:
DoneDisplayPoints =
"(" & CONVERT(FeaturesWithTheirIssues[TotChildCountDoneStoryPts], STRING) & ")"
 
rajendraongole1
Super User
Super User

Hi @EaglesTony -Using measures avoids circular dependency issues.You can move the logic for TotChildCountDonePoints into a measure, and then use it in the calculation for DoneDisplayPoints.

 

create a measure:

TotChildCountDonePoints_Measure =
VAR curParent = SELECTEDVALUE(ParentWithTheirIssues[Key])
RETURN CALCULATE(
SUM(ParentWithTheirIssues[Issues.Story_Points_10023]),
ParentWithTheirIssues[Key] = curParent && ParentWithTheirIssues[TranslatedStatus] = "Done"
)

 

display it using the following in measure

DoneDisplayPoints =
"(" & CONVERT([TotChildCountDonePoints_Measure], STRING) & ")"

 

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





The problem with the measure, is it can't find: ParentWithTheirIssues[Key]

Hi @EaglesTony - Since you’re calculating the total for each parent, ensure you’re only referencing static columns rather than calculated columns that might cause loops.

TotChildCountDonePoints =
VAR curParent = ParentWithTheirIssues[Key]
VAR final =
CALCULATE(
SUM(ParentWithTheirIssues[Issues.Story_Points_10023]),
FILTER(
ALL(ParentWithTheirIssues),
ParentWithTheirIssues[Key] = curParent
&& ParentWithTheirIssues[TranslatedStatus] = "Done"
)
)
RETURN IF(final = BLANK(), 0, final)

Once you’ve created the TotChildCountDonePoints column as shown above, you can now create the DoneDisplayPoints column as a string representation of the TotChildCountDonePoints

 

calculated column:

DoneDisplayPoints =
"(" & CONVERT(ParentWithTheirIssues[TotChildCountDonePoints], STRING) & ")"

 

Hope this clear the issue.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Wait, I am getting the circular reference again on:

 

DoneDisplayPoints =
"(" & CONVERT(ParentWithTheirIssues[TotChildCountDonePoints], STRING) & ")"

 

 

Not sure why I get it for that, as I have another calculated column as such that doesn't throw the circular reference:

 

DoneDisplay = "(" & CONVERT(ParentWithTheirIssues[TotChildCountDone],STRING) & ") " & ParentsWithTheirIssues[PctDone] & "%"
 
I'm thinking it has to do with the CALCULATE in the following:
TotChildCountDonePoints =
VAR curParent = ParentWithTheirIssues[Key]
VAR final =
CALCULATE(
SUM(ParentWithTheirIssues[Issues.Story_Points_10023]),
FILTER(
ALL(ParentWithTheirIssues),
ParentWithTheirIssues[Key] = curParent
&& ParentWithTheirIssues[TranslatedStatus] = "Done"
)
)
RETURN IF(final = BLANK(), 0, final)
 
I'm not 100% sure though.

Yes it does, so it was 2 calculated columns instead of using any measure.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors