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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Cant Get the total from a measure

Hi, i´m doing a work hours report, for that calculation i need to use for each month a number of available hours

deppending of the month that is not in our system ( I have directly connected the report to our ERP) so i decided to create a measure for each month this Way:

"Available Hours January = 168 - [No Presence]"

"Horas Disponibles Enero = (168 - [NO PRESENCIA])"

So with this i get the Available hours from each employee for this month , but  the total i get is not the total of all the employees selected, idividually is right, but the total is not.

 

2020-02-17_10h16_19.jpg

I have the same problem with other calculation in the same table

To the result of this operation i have to substract Non Billed Hours ammount and Hours in Job Orders

I Get valid values for each employee, but the total get a number that is not the Summa of all of them.

 

"No Signed Hours January = [Available Hours January]- [No Billed Hours]-[Job Orders Hours]"
"Horas No fichadas Enero = [Horas Disponibles Enero]- [HORAS NO FACTURADAS]-[HORAS EN OTs]"
 
2020-02-17_10h27_27.jpg

Any Idea? I have tried a lot of things but nothing worked.

Many Thanks for your help

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

SUMX combined with SUMMARIZE usually solves those kinds of problems.

 

SUMX(SUMMARIZE('Table', 'Table'[Técnico], "Hours", 168 - [NO PRESENCIA]), [Hours])

 

It will calculate the availiable hours by group (in this case by "Técnico") and the sum the result.

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

SUMX combined with SUMMARIZE usually solves those kinds of problems.

 

SUMX(SUMMARIZE('Table', 'Table'[Técnico], "Hours", 168 - [NO PRESENCIA]), [Hours])

 

It will calculate the availiable hours by group (in this case by "Técnico") and the sum the result.

 

 

Anonymous
Not applicable

Many Many Thanks!!! it worked Perfect, you think i should do the same for the other column where i dont get the right Total?

Anonymous
Not applicable

Great to hear it worked 🙂 The same pattern should be usable for the other columns as well.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.