Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
heidibb
Helper IV
Helper IV

Help with circular depenedency

Hello,

I have been reading about circular dependencies and am a bit confused by all the information since each scenario is different. I'm hoping someone might be able to help me with this.

 

I have a calculated measure

% Late Assessments = calculate(if(isblank(WeeklyAssessment[Count Late] / DISTINCTCOUNT(WeeklyAssessment[SurveyMasterID])) = TRUE,0,WeeklyAssessment[Count Late] / DISTINCTCOUNT(WeeklyAssessment[SurveyMasterID])))

 

From here, I'm just trying to create a column that states:

 Capture.JPG

The circular dependency referring to "Max Hits" is a column that has nothing to do with this measure that I can tell.

Max Hits = calculate(Max(WeeklyAssessment[NumberOfTeamLeadHits]), allselected(WeeklyAssessment[WEEK]))

Any thoughts?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

 

Hi @heidibb,

 

I think 'WeeklyAssessment[Count Late]' is a measure which stored in your table and will try to calculate through your date column, right?

 

If this is a case, I think the circular dependency is caused by this date column, both two measures are try to calculate through this column and power bi can't confirm which calculation will be process first.

 

You can also refer to below link to know more about this issue:

Understanding Circular Dependencies in Tabular and PowerPivot.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

 

Hi @heidibb,

 

I think 'WeeklyAssessment[Count Late]' is a measure which stored in your table and will try to calculate through your date column, right?

 

If this is a case, I think the circular dependency is caused by this date column, both two measures are try to calculate through this column and power bi can't confirm which calculation will be process first.

 

You can also refer to below link to know more about this issue:

Understanding Circular Dependencies in Tabular and PowerPivot.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
mattbrice
Solution Sage
Solution Sage

When you use a CALCULATE statement in a calculated column, it transitions in every other column in the table, including other calculated columns, into the filter context unless you explicitly exclude them using functions like ALLEXCEPT.  

 

So in your case, the measures '% Late Assessments' and 'Max Hits' are trying to transition each other into their respective filter contexts.  Since from DAX's perspective it cannot resolve one measure without the other already being computed, it detects a circular dependency and throws an error.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.