Forum Discussion
Why am I getting a circular reference ?
- 1 year ago
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.
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.
- EaglesTony1 year agoPost Prodigy
Yes it does, so it was 2 calculated columns instead of using any measure.
- EaglesTony1 year agoPost Prodigy
Wait, I am getting the circular reference again on:
DoneDisplayPoints =
"(" & CONVERT(ParentWithTheirIssues[TotChildCountDonePoints], STRING) & ")"- EaglesTony1 year agoPost Prodigy
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.