Forum Discussion
elmurat
1 year agoAdvocate I
Circular Dependency while creating a Column even if using different fields.
Hello, I have a Circular Dependency error in my column calculations despite using completely different fields. When I have a measure, I don't have this error. But I need to create a column beca...
- Anonymous1 year agoHi elmurat,Thank you for reaching out in Microsoft Community Forum.Thank you Deku for the helpful response.Please follow below steps to resolve the error;1.Make sure the calculated column works correctly at the row level, without relying on aggregation or filter context that only applies to measures.2.If the calculation needs values from other rows or tables, use RELATED or LOOKUPVALUE to fetch related data for the column.3.Modify the column logic to perform row-wise calculations, ensuring it works independently for each row:10-Day % Categories Column =VAR Percentage = DIVIDE(Sheet1[Actuals_10] - Sheet1[OtherColumn], Sheet1[Actuals_10])RETURNIF(Percentage > 0.70, "Above 70%",IF(Percentage < 0.50, "Below 50%", "Between 50% and 70%"))4.Make sure the fields used in the calculation are numeric and compatible for division.Please continue using Microsoft Community Forum.If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.Regards,Pavan.
elmurat
1 year agoAdvocate I
But I cannot use the measure as a Slicer.
Deku
1 year agoSuper User
Yes, that is why the field for the slicer has all of the logic for it's creation self contained, without the reference to the measure.
- elmurat1 year agoAdvocate I
I got what you mean, and I have already tried it, but when I make the column logic self-contained, the result is not right. Please see the 10-Day% Categories CLMN in the screenshot below.
- Anonymous1 year agoNot applicableHi elmurat,Thank you for reaching out in Microsoft Community Forum.Thank you Deku for the helpful response.Please follow below steps to resolve the error;1.Make sure the calculated column works correctly at the row level, without relying on aggregation or filter context that only applies to measures.2.If the calculation needs values from other rows or tables, use RELATED or LOOKUPVALUE to fetch related data for the column.3.Modify the column logic to perform row-wise calculations, ensuring it works independently for each row:10-Day % Categories Column =VAR Percentage = DIVIDE(Sheet1[Actuals_10] - Sheet1[OtherColumn], Sheet1[Actuals_10])RETURNIF(Percentage > 0.70, "Above 70%",IF(Percentage < 0.50, "Below 50%", "Between 50% and 70%"))4.Make sure the fields used in the calculation are numeric and compatible for division.Please continue using Microsoft Community Forum.If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.Regards,Pavan.