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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How do I calculate a percent column based on two aggregate sum columns from a matrix?

Hello all,

In Power BI, I created a matrix that looks something like this (I made a sample matrix from a sample data set in excel, but just pretend it's in Power BI):

2021-10-28_11-07-13.png

The matrix automatically calculated the sums of beaches and parks.

 

Here is an example of the dataset the matrix is built from:

2021-10-28_10-57-24.png

In the Power BI matrix this is how the data is arranged:

rows=location

columns= type, department

values= count of beaches, count of parks

 

And I want to create a new column in the matrix that calculates the percentact difference based on the sum beach/park counts:

2021-10-28_11-09-53.png

 

However, I've tried creating new measures but ran into errors. I saw from other posts that you would need to create a new column, which will technically work but then it has been calculating the percentage incorrectly.

 

When I create new percent coulumn Power BI has been calculating it based on my dataset, like this: 

2021-10-28_11-16-50.png

And when I add the % column to the value section of my matrix, it calculates a sum of my percentage. Which is not what I want:

2021-10-28_11-17-10.png

 

How do I calculate a percent column based on two aggregate sum columns from a matrix?

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 
Yes, you can always use the fields(either column or measure value) to create new measures and include in your report visuals.

 

 

Paul Zheng _ Community Support Team

Anonymous
Not applicable

I think I just solved it by creating a new measure: 

divide(sum(Table["Count of Beaches"]), sum(Table["Count of Parks"]))

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.

Top Solution Authors