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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Cervo114
Frequent Visitor

Problem with the total

Hi, I have a problem with the total, when there is a formula in the columns. Why in the total, does it calculate the formula as if it were a normal row, instead of giving me the total of the rows?

The margin formula is this, and in the row it is calculated correctly

Margin = ((SUM(MOVIMAG[VALVEN1])-[QTVEN] * SUM('TABRILIS'[PREZZO]))/([QTVEN] * SUM('TABRILIS'[PREZZO])))*100
Cervo114_0-1655290119280.png

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Cervo114 ,

In this case, you need to create another measure, because when calculated directly, its sum is based on the full table calculation and not the direct sum of two values.

Margine 2 = sumx(table, [Margine ])

 

And similar case refer:

https://community.powerbi.com/t5/Desktop/Total-is-wrong-in-a-matrix/m-p/348993 

https://community.powerbi.com/t5/Desktop/Sum-of-values-in-a-measure-with-divide-measure/m-p/296768#M... 

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @Cervo114 ,

In this case, you need to create another measure, because when calculated directly, its sum is based on the full table calculation and not the direct sum of two values.

Margine 2 = sumx(table, [Margine ])

 

And similar case refer:

https://community.powerbi.com/t5/Desktop/Total-is-wrong-in-a-matrix/m-p/348993 

https://community.powerbi.com/t5/Desktop/Sum-of-values-in-a-measure-with-divide-measure/m-p/296768#M... 

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

FarhanAhmed
Community Champion
Community Champion

Can you please share the sample data and let us know about the desired output in the Total Column







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




This is the formula:

Margine = ((SUM(MOVIMAG[VALVEN1])-[QTVEN] * SUM('TABRILIS'[PREZZO]))/([QTVEN] * SUM('TABRILIS'[PREZZO])))*100

 

and this is the correct risult: 61,625 (63,93+57,32=121.25/2=61,625) media

 

Cervo114_0-1655296847923.png

 

FarhanAhmed
Community Champion
Community Champion

Can you please share the sample data and let us know about the desired output in the Total Column







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.