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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Circular dependencies how to solve?

Hello, Can anyone help me

how to solve circular dependency!

I am creating the below column measure and I am getting the same error-
 
Sum of hours per employee test = CALCULATE( SUM(table[total_hours]),GROUPBY(table,table[employee_id]))



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

Hi @Anonymous ,

 

This column measure is seems that you want to calculate each employee total work hours, is it?

 

if yes please consider using the following expression:

 

Sum of hours per employee test =
CALCULATE(
    SUM( 'table'[total_hours] ),
    FILTER( 'table', [employee_id] = EARLIER( 'table'[employee_id] ) )
)

 

 

If this does not work, please provide some example data without sensitive data.

 


Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

This column measure is seems that you want to calculate each employee total work hours, is it?

 

if yes please consider using the following expression:

 

Sum of hours per employee test =
CALCULATE(
    SUM( 'table'[total_hours] ),
    FILTER( 'table', [employee_id] = EARLIER( 'table'[employee_id] ) )
)

 

 

If this does not work, please provide some example data without sensitive data.

 


Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Your GROUPBY is being used in the FILTER position for CALCULATE.  Are you trying to create a table of total hours by employee?

 

If so, try this instead:

NewTable=SUMMARIZECOLUMNS('table'[employee_id],'table',"TotalHours",SUM('table'[total_hours]))

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors