cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtaylor
Frequent Visitor

countif on a choice field

I am trying to display how many times "Approved" is in a column in my list. I can get the countif function to work when the field it is counting is just a plain number or text, but for some reason when the field is of type "choice" it gives me errors. Here is an example:

 

working fuction on a column of type "text": Countif('Policy Exceptions', comments = "this is a comment")

 

not working because the column type is "choice": Countif('Policy Exceptions', Approval_Status = "Approved") this gives me a red underline on the '=' character.

 

Does anyone have any info on what you have to do to count fields of a choice column? i just want to count the amount of exceptions that have been set to "Approved"

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

A choice column in sharepoint is a "complex type" - it will have the value that you see, plus an identifier. So you need to compare with the .Value property of the record:

Countif('Policy Exceptions', Approval_Status.Value = "Approved")

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

A choice column in sharepoint is a "complex type" - it will have the value that you see, plus an identifier. So you need to compare with the .Value property of the record:

Countif('Policy Exceptions', Approval_Status.Value = "Approved")

View solution in original post

wonderful! thank you so much!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,497)