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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
alejandrodelgad
Frequent Visitor

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.

 

 

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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