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
abdul26
Frequent Visitor

Adding both a total and an average column

I have created a marix with the following details 

 

Rows:  Category types 

Columns:   Week numbers 

Values - Values 

 

I wish to add both an average and a total column.

I am able to generate them individually but not together.

 

PowerBi provides the option of column subtotal that way I can have a total column. 

 

By using the following measure = 

IF( HASONEVALUE( week ) , [val_measure]  , AVERAGEX( VALUES( week ) ,  [val_measure]  ))     ,
I can display the average column in place of the total column.
 
How can I display both of them simultaneously.
 
abdul26_0-1666017824625.png

 

  
1 ACCEPTED SOLUTION

Hi @abdul26 ,

 

in this pbi file there is a very formal method for your problem. Let me know if the link does not work.

https://1drv.ms/u/s!Aj45jbu0mDVJiH9FTsdOyUHsl_Or?e=ErSRsr

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
abdul26
Frequent Visitor

@mangaus1111  wow , thank you so much for your response.

It's a really nice measure !! 

v-xiaosun-msft
Community Support
Community Support

Hi @abdul26 ,

 

According to your description, here is my solution.

I created a sample.

vxiaosunmsft_0-1666604526383.png

Create a measure to calculate the average value.

 

Average = AVERAGE(Tabelle1[Value])

 

Make sure the option followings is turned on. And then put the measure and "value" to values together. Put "value" to the first which will calculate the total.

vxiaosunmsft_1-1666604642138.pngvxiaosunmsft_2-1666604706789.png

Note that when we put measure to "value", it will create columns under  "columns" as the screenshot shows.

And you can refer to the following link.

Create a matrix visual in Power BI - Power BI | Microsoft Learn

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mangaus1111
Solution Sage
Solution Sage

sorry, but  I don´t know any formal method

mangaus1111
Solution Sage
Solution Sage

Hi @abdul26 ,

 

you can use 2 matrixs, one above the other.

 

See may pbi sample file here:

 

https://1drv.ms/u/s!Aj45jbu0mDVJiHXjhUleoc6Dg-eZ?e=SgOKxc

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply @mangaus1111 , it looks like a way around.

Isn't there any formal method to do it ? 

 

 

Hi @abdul26 ,

 

in this pbi file there is a very formal method for your problem. Let me know if the link does not work.

https://1drv.ms/u/s!Aj45jbu0mDVJiH9FTsdOyUHsl_Or?e=ErSRsr

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors