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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
mdvillanueva
Regular Visitor

Matrix Total Wrong and How to calculate percentages of each cell

1.PNG

 

Hi so this is how my work looks like. This has thousands of columns and millions of rows. I wanted to be able to get a result like this. try2.PNG

 

Can you suggest the next steps? I am new to using power bi so I am very sorry 😞 

1 ACCEPTED SOLUTION
BILASolution
Solution Specialist
Solution Specialist

Hi @mdvillanueva

 

Try this steps...

 

1. This is my sample data with a table called "Table" (You need to replace it by your table's name)

 

data.png

 

 

2. Create the next measures

 

Total Value = SUM('Table'[Value]) 
Total per Row = CALCULATE([Total Value];ALLEXCEPT('Table';'Table'[C1])) 
Percentage = DIVIDE([Total Value];[Total per Row]) 

NOTE: "C1" becomes rows in the matrix visual and "C2" becomes columns.

 

3. This is how the result look like...

 

resultado.png

 

 

I hope this helps

 

Regards

BILASolution

View solution in original post

12 REPLIES 12
mdvillanueva
Regular Visitor

Sir @BILASolution

 

I was able to figure things out! Thank you again for this! You really saved me today!

@mdvillanueva

 

If you have any problems. Enter here

 

Matrix

BILASolution
Solution Specialist
Solution Specialist

Hi @mdvillanueva

 

Try this steps...

 

1. This is my sample data with a table called "Table" (You need to replace it by your table's name)

 

data.png

 

 

2. Create the next measures

 

Total Value = SUM('Table'[Value]) 
Total per Row = CALCULATE([Total Value];ALLEXCEPT('Table';'Table'[C1])) 
Percentage = DIVIDE([Total Value];[Total per Row]) 

NOTE: "C1" becomes rows in the matrix visual and "C2" becomes columns.

 

3. This is how the result look like...

 

resultado.png

 

 

I hope this helps

 

Regards

BILASolution

@BILASolution

 

It says 'error' with the second script 😞 

 

Total per Row = CALCULATE([Total Value];ALLEXCEPT('Table';'Table'[C1])) 

 

@mdvillanueva

 

What's the error Message???

@BILASolution

 

Oh it was because of the use of ;

 

I replaced ';' with ',' and it worked!

Ok    Smiley Very Happy

Hi Sir! @BILASolution 😞

 

I did what you instructed me to do. But it wont show. You can look at the photo for reference.trytry.PNG

@mdvillanueva

 

Change the data type of "Value" column by "Whole Number"

 

format.png

 

 

 

@BILASolution

 

Sir, all of the cells are 0% 😞 

@BILASolution

 

Sir! I was able to figure things out! Thanks again! You really saved me today! 🙂 

@BILASolution

 

Currently trying to figure it out using your instructions. Thank you very much sir!!! 🙂

 

Though I have to clarify, what does it mean with 'First' and 'Last' in the value field? Does that divides my data?

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.