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

Calculate percentage between columns of a matrix

Hi all,

 

I am looking for a way to calculate the percentage between 2 columns of a matrix, for example in the sample data/file, I would like to add 2 new colums, Column 1: %Not preferred = Not Preferred/Final &  Column 2: %Preferred = Preferred/Final which will include percentage for the total as well. I have also included a link to the sample data.pbix file (Sample Data.pbix ). 

Thank you in advance for all the help.

image001.png

 

Sample pbix link -> Sample Data.pbix 

 

Thank you!!

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1721186573531.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Ritaf1983
Super User
Super User

Hi @Anonymous 
You can use these measures :

Basic sum = sum('Table'[Value])
 
Final =
CALCULATE([Basic sum],Module[Metric]="final")
 
Not prefered =
CALCULATE([Basic sum],Module[Metric]="Not preferred")
 
Not preferred % = DIVIDE([Not prefered],[Final])
 
Preferred =
CALCULATE([Basic sum],Module[Metric]="preferred")
 
Preferred % = DIVIDE([Preferred],[Final])
Ritaf1983_0-1721186468843.png

Just drag them to the values of the matrix ("columns" should stay blank)

Ritaf1983_1-1721186542473.png

The pbix is attached

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you so much @Ritaf1983 & @Ashish_Mathur . Both solutions work like a charm.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi @Anonymous 
You can use these measures :

Basic sum = sum('Table'[Value])
 
Final =
CALCULATE([Basic sum],Module[Metric]="final")
 
Not prefered =
CALCULATE([Basic sum],Module[Metric]="Not preferred")
 
Not preferred % = DIVIDE([Not prefered],[Final])
 
Preferred =
CALCULATE([Basic sum],Module[Metric]="preferred")
 
Preferred % = DIVIDE([Preferred],[Final])
Ritaf1983_0-1721186468843.png

Just drag them to the values of the matrix ("columns" should stay blank)

Ritaf1983_1-1721186542473.png

The pbix is attached

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ashish_Mathur
Super User
Super User

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1721186573531.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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