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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TimmK
Helper IV
Helper IV

Matrix Table Aggregated Values

I have the matrix table below which shows the consumption of each item per year/month.

Now for each row on the right side after the last column I want to show the AVG. Is this possible? I do not want to have the AVG for each year/month, but for the entire row.

Matrix.PNG

Setting.PNG

2 REPLIES 2
Anonymous
Not applicable

Hi @TimmK ,

 

Sorry for my late reply.

 

According to my understanding, you want to change the default value of Row subtotals,right?

You could use ISINSCOPE() like this:

Measure = IF(ISINSCOPE('Table'[Product]),SUM('Table'[Price]),AVERAGE('Table'[Price]))

The final output is shown below:

ISINSCOPE().jpg

 

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

tex628
Community Champion
Community Champion

Hi @TimmK , 

This should be possible, first you need to turn on the subtotals on column level, you can further modify the subtotals to only calculate on the first level. 

Next up you need to modify your measure to perform a different calculation when the total is calculated. This can be done by using a check with ISFILTERED() to determine if there is any filter active in the calendar table. The will mean that you can differentiate between the normal cells inside the matrix and the total being calculated at the far right.

When the total is calculated there are no filters on the calendar table being applied while when you're calculating an individual cell there will be a filter on month. 

Give it a try and let me know how it goes!

/ J


Connect on LinkedIn

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.