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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Raitup00
Regular Visitor

Calculation by Rows in a Matrix

Hi everyone. I have the following problem with a matrix in Power BI: The original database is as shown in Image 1, applying "unpivot columns" I have reached image 2. The goal I want to achieve is that in the columns appears months, in the rows categories (Fcst and Inventory), but for Fcst calculates the sum per month and for Inventory calculates the average per month (image 3). By placing the values in the "Fields" section it only allows me to place either sum or average (image 4). The objective is to get a matrix that shows the calculations of image 5 in the same matrix. I hope you can guide me ...

 

Raitup00_0-1636849923934.png

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Define these calculations as separate explicit measures and use the "Show on rows" feature rather than use Atributo for the row headers.

 

AlexisOlson_0-1636917852387.png

 

If you pivot your data so that there are separate columns for separate metrics,

AlexisOlson_1-1636918179066.png

then you can still use implicit measures and choose your summarization.

AlexisOlson_2-1636918226231.png

Note: This still uses the "Values on rows".

View solution in original post

2 REPLIES 2
Raitup00
Regular Visitor

Thanks AlexisOlson. That was the solution to my problem

AlexisOlson
Super User
Super User

Define these calculations as separate explicit measures and use the "Show on rows" feature rather than use Atributo for the row headers.

 

AlexisOlson_0-1636917852387.png

 

If you pivot your data so that there are separate columns for separate metrics,

AlexisOlson_1-1636918179066.png

then you can still use implicit measures and choose your summarization.

AlexisOlson_2-1636918226231.png

Note: This still uses the "Values on rows".

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.