cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Power Apps
Power Apps

Re: countif on a choice field

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
Highlighted
Power Apps
Power Apps

Re: countif on a choice field

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

Highlighted
Frequent Visitor

Re: countif on a choice field

wonderful! thank you so much!

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,061)