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
Raul
Post Patron
Post Patron

Sum of rows is not correct

Hello community!

I have this problem with a sum of a group:

 

SumGroup.png

 

The sum of the Rep.AbonamentCOL rows for the group X06 must be 598.27, not 446.00

The measures used in the table are:

Rep.AbonamentCOL = ([Cost]*[TmpFactCOL])/[TmpCostCOL]
TmpFactCOL = CALCULATE(SUM(TasquesColaboradors[Facturacio]);ALL(Colaboradors[Colaborador]))
TmpCostCOL = CALCULATE(SUM(TasquesColaboradors[Cost]);ALL(Colaboradors[Colaborador]))
 
The result of each Colaborador row is correct and the totals of TmpFactCOL and TmpCostCOL are correct too but the totals of the column Rep.AbonamentCOL are not correct. Why?
 
Thank you for your help.
 

 

8 REPLIES 8
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Raul,

Could you please just share a simple sample to have a test? Due to the measure in different condition is different, I suggest just share a sipmle data that may have the same problem, so I could test for you.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-danhe-msft,

As I said in another post. the data model it's a very complex and big and I can't shared, sorry very much.

 

I'm trying another way to get the amounts I need by creating a calculated table. I use the following function to create the table:

TotalsRepartiment = ADDCOLUMNS(SUMMARIZE(TasquesColaboradors;Colaboradors[Colaborador];Arees[Àrea];GrupsEmpreses[Grup Empresa];Clients[Cod_ cliente]);"TFacturacio";[Rep.AbonamentCOL];"TCost";[Cost])
but the result is not the expected:
ColaboradorNameAreaNameGrupoNameClienteNameTFacturacioTCost
AMOLABX06AM7,8912,5
AMOLABX06AMB 0,5
AMOLABX06REP450,86170,83
AMOLABX06TRA895,18216,67

 

because the result should be as follows:

ColaboradorNameAreaNameGrupoNameClienteNameTFacturacioTCost
AMOLABX06AM5,8112,5
AMOLABX06AMB 0,5
AMOLABX06REP334,34145,86
AMOLABX06TRA258,1279,17

 

Why are the results of the calculated table incorrect? What do I do wrong?

Thanks!

themistoklis
Community Champion
Community Champion

@Raul

 

Can you change your measures, to these ones and see if they work?

 

TmpFactCOL = SUMX(VALUES (Colaboradors[Colaborador]) ; CALCULATE(SUM(TasquesColaboradors[Facturacio])))

TmpCostCOL = SUMX(VALUES (Colaboradors[Colaborador]) ; CALCULATE(SUM(TasquesColaboradors[Cost])))

Don't work, the result for the TmpFactCOL and TmpCostCOL are blank.

Thanks @themistoklis.

@Raul

 

Can you share the workspace with us?

Hello @themistoklis,

The workspace I can't share because it's a very complex and big but I can give you more information. This is the database model of this table:

 

Model

 

The Tareas table it's a view of two tables: one with the Hores and Cost values and the other with the Facturacio values.

Tha table shows the ColaboradorName (AMO), AreaName (LAB), GrupoName (X06) and ClienteName (AM, AMB, REP,..) and has assigned the following filters:

ColaboradorName = AMO, AreaName = LAB.

 

I hope that with these data I can help you a little more. Thank you!

 

AlB
Community Champion
Community Champion

Hi @Raul

From what I see, if you calculate 

([Cost]*[TmpFactCOL])/[TmpCostCOL]

with the totals that your table shows for those three parameters, the result is indeed 446, so it looks correct. 

Yes, this is another mistake. The result for each row it's correct and, if you aplied the measure for the total group it's correct too but I want that the total group shows the sum of the rows, no the result of the measure. It's possible? I thought that this was the default calculation of the table.

Thanks @AlB for your post.

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.