Forum Discussion
A circular dependency
Hello Everyone !
im facing an issue where i want to create a column using a measure but an error arise ,
the issue
the formula for completion Feb
Completion Feb =
IF(
VALUES('Master'[Start Date].[Date]) <= MAX('Master'[Feb-24]) &&
VALUES('Master'[End Date].[Date]) >= MAX('Master'[Feb-24]),
1,
0
)formula for Jan-24-Rev0
Jan-24-Rev0 = [Completion]formula for completion
Completion =
IF(
MAX('Master'[Start Date].[Date]) <= MAX('Master'[Jan-24]) &&
MAX('Master'[End Date].[Date]) >= MAX('Master'[Jan-24]),
1,
0
)
thank you for helping !
5 Replies
- gmsambornSuper User
Hi butterscotch
Calculated columns are calculated on refresh before any visuals, slicers etc are active. That includes measures as well since they rely on context and there is no context at that point.
Not a best practice.
- butterscotchHelper II
im sorry, but i dont quite understand
- gmsambornSuper User
There is an order of evaluation. If a calculated column uses a measure that relies on context (filters, slicers), it might work when writing it because the slicer would have a selection (creating context). On the other hand, when a refresh is being done, there are no slicers or filters active because they aren't evaluated until after the refresh is complete.
I hope that makes sense.
- saud968Memorable Member
There is a workaround that I used in one of my projects by creating a reference Table based on the OG table
WeekUniqueTicketTable =ADDCOLUMNS(Master(Your Table Name),"Master2(New Table Name)", [Any Column Name as Reference])
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos! - AnonymousNot applicable
Hi butterscotch ,
Has your problem been resolved? If it has been resolved, you can accept the answer as solution that helps you. if the problem is still unresolved, please provide more details with your desired out put and pbix file without privacy information.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Ada Wang