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! Learn more

Reply
Anonymous
Not applicable

Matrix table, columns based on different average

I am working with a matrix table and I want the columns to show the individual detail as well as average.

For example I want the matrix table to show me the average sales over the past 10 years, the 5 year average, and sales from 2021, 2020 and 2019. 

Basically I am envisioning a matrix table with 5 columns, one for each of the categories mentioned above (10 yr avg where 2011-2020, 5 yr avg where 2016-2020, 2021, 2020, and 2019).

 

I have only figured out how to add the 10 yr column (see below). I do not know how to show the other categories. What would the best way to do this be?

 

smei_0-1639011319164.png

 

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You need to create 5 measures for these 5 columns and put all of them in Values field area of the matrix. Share some sample data and we can help create measures based on that. 

 

For example, if your data has Year column, you can use measures like

 

2011-2020 = DIVIDE(CALCULATE(SUM(Sales[Sales]),Sales[Year]<YEAR(TODAY()),Sales[Year]>=YEAR(TODAY())-10),10)


2016-2020 = DIVIDE(CALCULATE(SUM(Sales[Sales]),Sales[Year]<YEAR(TODAY()),Sales[Year]>=YEAR(TODAY())-5),5)


2021 = CALCULATE(SUM(Sales[Sales]),Sales[Year]=YEAR(TODAY()))

 

21121401.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You need to create 5 measures for these 5 columns and put all of them in Values field area of the matrix. Share some sample data and we can help create measures based on that. 

 

For example, if your data has Year column, you can use measures like

 

2011-2020 = DIVIDE(CALCULATE(SUM(Sales[Sales]),Sales[Year]<YEAR(TODAY()),Sales[Year]>=YEAR(TODAY())-10),10)


2016-2020 = DIVIDE(CALCULATE(SUM(Sales[Sales]),Sales[Year]<YEAR(TODAY()),Sales[Year]>=YEAR(TODAY())-5),5)


2021 = CALCULATE(SUM(Sales[Sales]),Sales[Year]=YEAR(TODAY()))

 

21121401.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

lbendlin
Super User
Super User

@Anonymous These additional matrix "columns" actually have to be based on measures, and they have to be placed in the Values area, not the columns area.

Helpful resources

Announcements
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!

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