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
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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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