Sharepoint Online List: Column Formulas: Counting Pass/Fail answers in a numeric column

Seth Kubli 21 Reputation points
2022-12-02T03:33:27.713+00:00

I have 21 columns of where you can select either Pass, Fail type, I would like to create a Pass/Fail % column that counts the number of Pass in a percentage or numerical count. I have seen other answers but I can not make the code work, I keep getting a 1 or roughly 2,100 percentage. I added the column names with the picker, I have set the output to number. Can anybody help please?

The options in each drop column are
Pass
Fail
Not Assessed
In Progress-Documentation
In Progress-Awaiting Client

Here's my formula I have been trying:

=COUNT(IF([8.1.1.1 Test Results]="Fail",1,0)+IF([8.1.1.2 Test Results]="Fail",1,0)+IF([8.1.1.3 Test Results]="Fail",1,0)+IF([8.1.2.1 Test Results]="Fail",1,0)+IF([8.1.2.2.a-m Test Results]="Fail",1,0)+IF([8.1.3.1 Test Results]="Fail",1,0)+IF([8.1.4.1 Test Results]="Fail",1,0)+IF([8.1.4.2 Test Results]="Fail",1,0)+IF([8.1.6.1 Test Results]="Fail",1,0)+IF([8.1.6.2 Test Results]="Fail",1,0)+IF([8.2.1.1 Test Results]="Fail",1,0)+IF([8.2.1.2 Test Results]="Fail",1,0)+IF([8.2.2.1 Test Results]="Fail",1,0)+IF([8.2.2.2 Test Results]="Fail",1,0)+IF([8.2.2.3 Test Results]="Fail",1,0)+IF([8.2.4.1 Test Results]="Fail",1,0)+IF([8.2.4.2 Test Results]="Fail",1,0)+IF([8.4.1.1 Test Results]="Fail",1,0)+IF([8.4.1.2 Test Results]="Fail",1,0)+IF([8.4.1.3 Test Results]="Fail",1,0)+IF([8.4.1.4 Test Results]="Fail",1,0))

266397-image.png

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,946 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yi Lu_MSFT 17,591 Reputation points
    2022-12-02T07:16:43.807+00:00

    Hi @Seth Kubli
    You could try this formula:

    =100*ROUND((IF([8.1.1.1 Test Results]="Fail",1,0)+IF([8.1.1.2 Test Results]="Fail",1,0)+IF([8.1.1.3 Test Results]="Fail",1,0)+IF([8.1.2.1 Test Results]="Fail",1,0)+IF([8.1.2.2.a-m Test Results]="Fail",1,0)+IF([8.1.3.1 Test Results]="Fail",1,0)+IF([8.1.4.1 Test Results]="Fail",1,0)+IF([8.1.4.2 Test Results]="Fail",1,0)+IF([8.1.6.1 Test Results]="Fail",1,0)+IF([8.1.6.2 Test Results]="Fail",1,0)+IF([8.2.1.1 Test Results]="Fail",1,0)+IF([8.2.1.2 Test Results]="Fail",1,0)+IF([8.2.2.1 Test Results]="Fail",1,0)+IF([8.2.2.2 Test Results]="Fail",1,0)+IF([8.2.2.3 Test Results]="Fail",1,0)+IF([8.2.4.1 Test Results]="Fail",1,0)+IF([8.2.4.2 Test Results]="Fail",1,0)+IF([8.4.1.1 Test Results]="Fail",1,0)+IF([8.4.1.2 Test Results]="Fail",1,0)+IF([8.4.1.3 Test Results]="Fail",1,0)+IF([8.4.1.4 Test Results]="Fail",1,0))/21,2)&"%"  
    

    This will give you a result which calculates the percent of fail in total 21.

    This is my test, I create 3 choice column and use the following formula to calculate the pass percent:

    =100*ROUND((IF(Choice="Pass",1,0)+IF(Choice2="Pass",1,0)+IF(Choice3="Pass",1,0))/3,2)&"%"  
    

    This is my test result:

    266531-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.