Forum Discussion
Circular Dependency within Table for calculated column
Couple of issues here.
1. Measure is evaluated in filter context, but you are trying to use it in row context calculation.
2. You can't use measure that reference table itself in the calculated column in same table.
There are couple of ways to work around it, that I can think of.
1. Create summarized table using dax. Create relationship, perform your calculation based on it.
2. Add your calculated column(s) using "M" in query editor.
I prefer method 2. Especially when calculated column(s) are in Fact table.
How do I add my calculated columns?
- Chihiro7 years ago
Solution Sage
Without sample data, hard to help you. I'd recommend uploading pbix with sample model (using dummy data, but with same structure) to OneDrive or some other service and share a link here.
It makes it so much easier to help you, when we don't have to recreate/imagine the model you are working with.
- Anonymous7 years agoNot applicable
Here's the simplified version of the data:
https://drive.google.com/open?id=1gvm0dxSIkp3iDj9AdyKLGSTY8vTSi8VX
- Anonymous7 years agoNot applicable
Any idea on how to solve this?
- Chihiro7 years ago
Solution Sage
Try using it as measure instead of calculated column.
With your sample it returns Group1 for all but the last row (which shows Other as MarginClass & MarginPL show NaN).
Not sure if this is correct result or not.