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
dofrancis3
Resolver I
Resolver I

Percentage of two columns

Deart Colleagues,

Could you help me with DAX mesure or calculate colums for below table please!

 

RegionDistrictStausNbr_FailNbr_Fail% FAIL and PASS
R1RD11Fail   
R1RD15Pass   
R1RD12    
R1RD13Pass   
R3RD38Fail   
R2RD21Pass   
R3RD36Pass   
R2RD22Fail   
R2RD23Pass   
R1RD16Fail   
R3RD31Pass   
R1RD14    
R3RD32Pass   
R3RD33Pass   
R3RD37Fail   
R3RD34Pass   
R3RD35Fail   
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dofrancis3 ,

 

Your requirements are a bit vague. I don't know if my understanding is correct. Please correct me if I misunderstand your requirements.

 

My understanding is that you want to calculate the percentage of failures and passes.

 

Please try:

 

Create 2 measures to count the total number of fail and pass.

Total Fail = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Fail"))

Total Pass = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Pass"))

 

Create 2 measures to calculate the percentage of fail and pass.

% Fail = DIVIDE([Total Fail], [Total Fail] + [Total Pass], 0)

% Pass = DIVIDE([Total Pass], [Total Fail] + [Total Pass], 0)

 

The final page effect is as follows:

vhuijieymsft_0-1716254604005.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @dofrancis3 ,

 

Your requirements are a bit vague. I don't know if my understanding is correct. Please correct me if I misunderstand your requirements.

 

My understanding is that you want to calculate the percentage of failures and passes.

 

Please try:

 

Create 2 measures to count the total number of fail and pass.

Total Fail = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Fail"))

Total Pass = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Pass"))

 

Create 2 measures to calculate the percentage of fail and pass.

% Fail = DIVIDE([Total Fail], [Total Fail] + [Total Pass], 0)

% Pass = DIVIDE([Total Pass], [Total Fail] + [Total Pass], 0)

 

The final page effect is as follows:

vhuijieymsft_0-1716254604005.png

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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