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
mrbajana
Helper III
Helper III

Change from sum to average in a Matrix total

It is possible to change the subtotals of a Matrix from sum to average.

2018-05-29_10h51_19.png

 

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@mrbajana,

 

You may refer to the following post.

https://community.powerbi.com/t5/Desktop/monthly-average-of-daily-sums/m-p/291451#M128396

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello,

 

The way grand total works is based on the column if you take Sum in the column it will give a grand total of the sum if you want average change you calculation to average and grand total will be based on average.

 

Let me know if this not you are expecting or give us sample data.

Thanks for your answer, the issue is that the columns I need with the sum , but at the end in the subtotal I Need an average based on the sum columns. 

Anonymous
Not applicable

Hi,

 

So i have created 2 calculations

 

 

Avg and Sum

 

 

I am checking if total count of columns= total rows in a table then give me "average" else give me "
"sum".

 

Sum = CALCULATE(SUM('Table 1'[SPHA's Filled]),ALLEXCEPT('Table 1','Table 1'[Job: Name])) ( which will give you sum)

Avg =CALCULATE(AVERAGE('Table 1'[SPHA's Filled]),ALLEXCEPT('Table 1','Table 1'[Job: Name]))  (which will give you average)

 

 Grand total Formula  :

 

Total = if(COUNT(a[write your column])=COUNTROWS('Table 1'),[avg],[sum])

 

 

Thanks,

Aditya

Anonymous
Not applicable

If you have got it, Please mark this as closed.

 

Thanks

Aditya

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.

Top Solution Authors