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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,713)