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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
acad
New Member

add quantity

Hello All, I am pretty new in PBi so I need help. I have data, like bellow:

datadata

In PBi I made Matrix: 

matrixmatrix

now I would like to add column (in yellow) with calculated percentages B column in relation to Total:

new matrixnew matrix

Is it possible and how to do this?

Thanks a lot for hints or help.

A.

 

 

3 REPLIES 3
TedPattison
Microsoft Employee
Microsoft Employee

I don't think you will be able to achive that using the Matrix. For a martrix, you can only use columns for the Rows and Columns but you can use a measure. However, you will need a measure to calculate the % of two rolled up aggregate values.

 

I would start by using a table visual instead of a matrix. Create a new measure for each column ou want.

 

For example, create the following 4 measures. 

 

Sum A = SUMX(FILTER(partsTable, [Part]="A"), partsTable[Quantity])
Sum B = SUMX(FILTER(partsTable, [Part]="B"), partsTable[Quantity])
Total = SUM(partsTable[Quantity])
B/Total = SUMX(FILTER(partsTable, [Part]="B"), partsTable[Quantity])/sum(partsTable[Quantity])

Make sure to update formatting for the last measure named B/Total for percentage formatting instead of whole number formatting, AFter that, add the Name column and each of those four measure to get this effect.

 

Parts.png

 

 

 

 

you create a table visual instead

Small typo in previous post where I said "can" where I should have said "cannot". It should read like this.

 

"I don't think you will be able to achieve that using the Matrix. For a martrix, you can only use columns for the Rows and Columns but you cannot use a measure. "

 

sorry to all for an confusion..

Hi, thanks a lot for help and example.

BR. acad

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.