cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
gvlado
Advocate I
Advocate I

How to make matrix table with average only at the end

Hello community.
Can someone help with some simple solution for the problem
Want to make matrix table and add total average at the end?

gvlado_0-1695370624103.png

 

#ProductJanFebMarchTotalAverage
1A1020306020,0
2B510203511,7
3C2527106220,7
6Total40576015752,3

 

Thanks a lot

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

Hi  @gvlado ,

I created some data:

Sorry, Power BI temporarily can not achieve this function, this is the Power BI design concept, no matter Column Total rows or Row Total rows are the last column or row of the matrix, but you can add a row in front of the Total, but you need to create a new table.

vyangliumsft_0-1695633039873.png

 

Here are the steps you can follow:

1. Create measure.

Table 2 =
var _table1=
SUMMARIZE(
    'Table','Table'[Product],
    "Month","Table_Average",
    "Value",
    AVERAGEX(
        FILTER(ALL('Table'),'Table'[Product]=EARLIER('Table'[Product])),[Value]))
return
UNION(
    'Table',_table1)

vyangliumsft_1-1695633039876.png

2. Result:

vyangliumsft_2-1695633081943.png

 

 

Best Regards,

Liu Yang

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

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @gvlado ,

I created some data:

Sorry, Power BI temporarily can not achieve this function, this is the Power BI design concept, no matter Column Total rows or Row Total rows are the last column or row of the matrix, but you can add a row in front of the Total, but you need to create a new table.

vyangliumsft_0-1695633039873.png

 

Here are the steps you can follow:

1. Create measure.

Table 2 =
var _table1=
SUMMARIZE(
    'Table','Table'[Product],
    "Month","Table_Average",
    "Value",
    AVERAGEX(
        FILTER(ALL('Table'),'Table'[Product]=EARLIER('Table'[Product])),[Value]))
return
UNION(
    'Table',_table1)

vyangliumsft_1-1695633039876.png

2. Result:

vyangliumsft_2-1695633081943.png

 

 

Best Regards,

Liu Yang

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

This solution works in terms of Average but Total is now wrong (upgraded with this Average)
Original Total is 20+10+30= 60
New Total is 20+10+30+20=80

Ritaf1983
Super User
Super User

Hi @gvlado 

Unfortunately, we don't have an option for multiple totals on matrixes.

There is an idea about this issue, you can vote for it (i voted :))

https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=29ec2808-fc5b-42a8-964a-b10d878654b0

You can also use a workaround with calculated groups, please refer to the link with the tutorial:

https://www.youtube.com/watch?v=ExCD0vM-OEU

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

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors