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
alexeisenhart
Resolver I
Resolver I

Matrix of functions

Hello. I need to create a daily summary chart that reports the total, max, average and max / average of several measures.

For example...

Source Data:

AB
210
520
650
310

 

Desired result in Power BI

 AB
Total1690
Max650
Avg422.5
Max : Avg1.52.22

I previously acheived this result by creating a view in SQL Server to calculate the dataset that I needed and threw it into a matrix using a column called "function" for the row header. But I'm rebuilding the report to more properly utilize measures.

I don't think it is possible to create a visual that would accept a measure and then automatically apply these sort of aggregate functions. (Perhaps it would be possible with columns instead of measures, but that wouldn't help in this situation.)

Is there a visual that would allow me to arbitrarily put measures into a matrix, somewhat like Excel does? Something that would allow me build a measure for calculating the max of A and then displaying it in (1,1) and then putting other measures into other cell positions?

Or, would is there a better visualization to display these values? Ultimately, Max : Avg is the most important measure. This table has 6 measures / column headers.

I'm open to any thoughts or ideas 😃 Thank you!

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

Hi @alexeisenhart  ,

 

By my test, I can’t put the measure to a matrix using your sample data. The following is the sample  that I implement in Power Query. If there are other columns and relationships in your actual tables, you can reference the blog to have a try using the option of Show on rows .

 

  1. Calculate Max, Sum, Avg , Max:Avg in advance and get data in Power Query. Then copy three tables of Table1 for appending later.

0.png

 

  1. Choose two columns of Sum_A and Sum_B -- > click Home -- > Remove Columns -- > Remove Other Columns.    And the same steps as the other tables for Max, Avg and Max:Avg.

1.png

  1. Choose the columns of Sum_A and Sum_B -- > click Transform -- > Unpivot Columns .

2.png

  1. Click  Home -- >Append Queries

3.png

  1. Click Add Column -- > Conditional Column.  Add two new columns.

4.jpg5.jpg6.jpg

  1. Remove the column “Attribute”. Click  Home -- > Remove Columns

7.jpg

  1. Remove the duplicate rows. Click Home -- > Remove Rows -- > Remove Duplicates. Then apply changes and close.

8.png

  1. Use Matrix to implement the result.

9.png

Best Regards,

Xue Ding

 

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

Best Regards,
Xue Ding
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

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @alexeisenhart  ,

 

By my test, I can’t put the measure to a matrix using your sample data. The following is the sample  that I implement in Power Query. If there are other columns and relationships in your actual tables, you can reference the blog to have a try using the option of Show on rows .

 

  1. Calculate Max, Sum, Avg , Max:Avg in advance and get data in Power Query. Then copy three tables of Table1 for appending later.

0.png

 

  1. Choose two columns of Sum_A and Sum_B -- > click Home -- > Remove Columns -- > Remove Other Columns.    And the same steps as the other tables for Max, Avg and Max:Avg.

1.png

  1. Choose the columns of Sum_A and Sum_B -- > click Transform -- > Unpivot Columns .

2.png

  1. Click  Home -- >Append Queries

3.png

  1. Click Add Column -- > Conditional Column.  Add two new columns.

4.jpg5.jpg6.jpg

  1. Remove the column “Attribute”. Click  Home -- > Remove Columns

7.jpg

  1. Remove the duplicate rows. Click Home -- > Remove Rows -- > Remove Duplicates. Then apply changes and close.

8.png

  1. Use Matrix to implement the result.

9.png

Best Regards,

Xue Ding

 

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

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

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.