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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors