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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
TravianMcNavian
Regular Visitor

Adding A Percentage Column To A Matrix

Greetings,

I hope you are having a blessed day!

I am attempting to add a percentage summary to the end of a matrix in my PowerBI report.

 

My current Matrix looks like this:

 

Group FPTotal
A012820
B14510
C12710
D 7815
E17210
R113620
Total4453685

 

I ultimately want the matrix to look like this:

 

GroupPF TotalPass Percent
A81202040%
B5411050%
C7211070%
D87 1553%
E2711020%
R61312030%
Total3645485--

 

My intuition is that this problem can be solved via a measure, I have tried generating a measure using the following DAX expression:

PassRate =
DIVIDE (
    COUNTROWS ( FILTER ( Query1, Query1[Pass] = "P" ) ),
    CALCULATE ( COUNTROWS ( Query1 )ALL ( Query1 ) )
)

 

However when I try to use the above code, and add it to the Columns or Values field, the table breaks and is filled with 0%s.

 

What is a way I can add a Percentage column to the first Matrix?

 

 

1 ACCEPTED SOLUTION
MahyarTF
Memorable Member
Memorable Member

Hi,

If you want to create a column, that is calculated the percentage value of passing based on each row, you could use below code ("Column 4" is the column without any title in your message) :

Pass percent = divide( [P], ([P] + [F] + [Column4] ))
MahyarTF_0-1658281954355.png

 

Mahyartf

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @TravianMcNavian,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

MahyarTF
Memorable Member
Memorable Member

Hi,

If you want to create a column, that is calculated the percentage value of passing based on each row, you could use below code ("Column 4" is the column without any title in your message) :

Pass percent = divide( [P], ([P] + [F] + [Column4] ))
MahyarTF_0-1658281954355.png

 

Mahyartf
indkitty
Helper II
Helper II

 Hi
What is the below column? 
Group
 What is this column ?
F
P
Total
A
0
12
8
20
B
1
4
5
10
C
1
2
7
10
D
 
7
8
15
E
1
7
2
10
R
1
13
6
20
Total
4
45
36
85
 
Do you have screen shot of data?

Greetings,

The column without values is a blank column.

Some sample data is reproduced in the table in this message:

AP
AP
AF
B 
C 
DF
R 
E 
AP
BP
CP
DF
EF
RF
RF
RF
DF
AF
AF
AF
BF
CP
DP
RP
EF
AF
BF
CF
DF
EF
RF
RP
RP
DP
AP
AF
AP
BP
CP
DF
RF
EF
AF
BF
CP
DP
EP
RF
RF
RF
DF
AF
AF
AF
BP
CP
DP
RP
EF
AP
BP
CP
DF
EF
RF
RF
RF
DP
AP
AP
AF
BF
CF
DF
RF
EF
AF
BP
CP
DP
EP
RF
RP
RP
DP


Warm Regards,
~Travian

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors