The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have the following column created:
Solved! Go to 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.
Proud to be a Super User! | |
Anybody got any ideas ?
I have this, which is good:
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.
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.
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:
Yes it does, so it was 2 calculated columns instead of using any measure.