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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Marango
Regular Visitor

Help on making calculations of columns in a matrix table

Hello!

to make it ilustrative, I made  this Matrix table so In the cloumns the first raw is divided in "MUESTRAS", "DUPS" AND "PRODUCCIÓN", each one has two quantities "modelos" and "unidades". I need to make some calculations.

 

Marango_0-1724989980344.png

1) need to see the  percentage of how many  "mdelos-producción" are from  "modelos-muestras", in excel I will just do this : (modelos producción)cell / (modelos muestras)cell -- and change the number to %

 

2) I need to do also the following formula:

 total "unidades"/ 300 

 

it would be great if I could add it in the same matrix table, but if I need to do it separately I can make it, but really need this two KPIS.

 

Thank you!@links to meme

 

3 REPLIES 3
Marango
Regular Visitor

Hi,

sorry for my late reply. I am not able to upload my dar base so I am sending a wetransfer with the PBIX and an excel file with the same date. in the  excel in the "results" sheet I highlighted in yellow what I want to get.

https://we.tl/t-t5mMhi0JmC

thank you

Anonymous
Not applicable

Hi @Marango ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1725243807321.png

(2) We can create measures. 

Percentage Measure = 
var  _modelos_producci=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Cliente]=MAX('Table'[Cliente]) && 'Table'[Tipo de Venta]="Producción" && 'Table'[Type2]="Modelos"))
var _modelos_muestra=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Cliente]=MAX('Table'[Cliente]) && 'Table'[Tipo de Venta]="Musetra" && 'Table'[Type2]="Modelos"))
RETURN DIVIDE(_modelos_producci,_modelos_muestra)
total unidades = 
var _a=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Cliente]=MAX('Table'[Cliente]) && 'Table'[Type2]="Unidades"))
RETURN DIVIDE(_a,300)

(3) Then the result is as follows.

vtangjiemsft_3-1725244453410.png

 

 

Due to the nature of the matrix, Percentage Measure and total unidades will appear under each category, if you don't want so many duplicates, you can manually scale the columns to hide them. Or display them as visual objects in a table.

 

Best Regards,

Neeko Tang

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

Rupak_bi
Impactful Individual
Impactful Individual

Please share sample data. and desired output for validation. 



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

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.