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

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

Reply
Anonymous
Not applicable

Sum of visible row values by separate column

I'm trying to do a basic sum calculation on a basic table and use it as conditional formatting. I need to sum the hours that each employee works across multiple projects (see table). I am using the below formula, but getting incorrect results - not all employees are highlighted - Both the 35 hours and 10 hour cell should be highlighted for john:

 

 

calculate(sum('Project'[Hours]),ALLEXCEPT('Project','Project'[Project_Name],'Project'[Employee]))

 

 

Project_NameEmployeeHours
LawnJohn35
FactoryJohn10
FactoryMike40
11 REPLIES 11
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Can you take a screenshot of the relationship between the two tables and the fields in the tables?

 

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

az38
Community Champion
Community Champion

@Anonymous 

try if I understand you correct

calculate(sum('Project'[Hours]),ALLEXCEPT('Project','Project'[Employee]))

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38thank you for the reply

 

that is the calculation that i've been trying to use, but it does not sum the values. It returns the row by row hours (i.e., 35, 10,40)

az38
Community Champion
Community Champion

@Anonymous 

so, whats your desired output based on your data sample?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 

Project_NameEmployeeHoursSUM OF HOURS
LawnJohn3545
FactoryJohn1045
FactoryMike4040
az38
Community Champion
Community Champion

@Anonymous 

did you try my previous suggest

= calculate(sum('Project'[Hours]), ALLEXCEPT('Project','Project'[Employee]))

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38yes, but it returned 

Project_NameEmployeeHoursSUM OF HOURS
LawnJohn3535
FactoryJohn1010
FactoryMike4040
az38
Community Champion
Community Champion

@Anonymous 

I think you are doing something wrong

 

Снимок.PNG

pay attention I remove

'Project'[Project_Name],

from your statement


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 - thank you - My table has columns from other database tables as well - do you think that is preventing it from working?

az38
Community Champion
Community Champion

@Anonymous 

I think, no, we drop all filters from context besides employee

do you create a measure in the same Project table?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

the measure is in the project table - but the employee is in a different table

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.