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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
oroussel
New Member

How to calculate a sum of averages ?

Dear PBI community

 

As introduction, I'm new user that need help as I did not find on forum. my request is the opposite of tradionnal "average of sums..."

 

Here we go : I created a matrix to get average prices ("prix" calculted by "Val €" / "Qtes T" (see below)

 

The 3 lines represents successives operations of same product transformation. Consequently, to get the total price, I need to sum the individual prices. Means that, instead of returning 65.33€, I'm expecting to get 148.66€ (sum of 81.45 + 52.21 + 15.00). I tried to create new measures or columns but failed to create the right formula...

 

In second step, "Qtés" total could be also re-calculated also based on formula "Val €" / "Price €") to get a coherent information but I'm not sure this is possible...

 

Thanks for your help !

 

Pic PBI subtotal 2.jpg

Olivier

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

HI @oroussel,

 

The Prix is a measure?

When you use a measure the value are always recalculated based on the variable you have so in the total you will have:

-165352 € / 2531 = 65.33 that it's the value you are getting.

 

You need to add the same formula but as a clomun and then add it to you matrix and you will get the 145 since making it a column it wil do the calculation for each row individually independtly of the variable you put in the Matrix.

 

Regards,

 

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi MFelix

 

That worked! I added a column as recommended but also modified my formula by deleting the SUM function intially included. I'll try now to play with colums features to discover more!

 

Many thanks for quick answer

 

Olivier 

View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

HI @oroussel,

 

The Prix is a measure?

When you use a measure the value are always recalculated based on the variable you have so in the total you will have:

-165352 € / 2531 = 65.33 that it's the value you are getting.

 

You need to add the same formula but as a clomun and then add it to you matrix and you will get the 145 since making it a column it wil do the calculation for each row individually independtly of the variable you put in the Matrix.

 

Regards,

 

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi MFelix

 

That worked! I added a column as recommended but also modified my formula by deleting the SUM function intially included. I'll try now to play with colums features to discover more!

 

Many thanks for quick answer

 

Olivier 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.