cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oangodd
Level: Powered On

Counting All Occurrences of a String in an Excel Spreadsheet Field Using CountIf With Filter

Suppose I have an Excel sheet containing names of all the tenants of an apartment building, payment due date, payment date, payment status,  and number of days overdue. So I have the following fields in my Excel sheet:

FullName, Payment Due Date, Payment Date, Payment Status, Days Overdue 

 

I am trying to show in PowerApp the total number of people who have not yet paid their rent . The following is what I have tried but it is not working.

CountIf(Filter(ExcelTable, ExcelTable.'Payment Status' = 'Unpaid'))

 

1 ACCEPTED SOLUTION

Accepted Solutions
aprildunnam
Level 10

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

 Have you tried this removing the "ExcelTable."?  Like this:

 

CountIf(ExcelTable, 'Payment Status' = 'Unpaid')
 

View solution in original post

5 REPLIES 5
aprildunnam
Level 10

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

I believe the issue is you don't need the "filter" in your function.  Try this instead:

 

CountIf(ExcelTable, ExcelTable.'Payment Status' = 'Unpaid')
oangodd
Level: Powered On

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

Hi, Thanks for your reply. I have tried that but it gave me the error "Invalid Argument Type".

aprildunnam
Level 10

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

 Have you tried this removing the "ExcelTable."?  Like this:

 

CountIf(ExcelTable, 'Payment Status' = 'Unpaid')
 

View solution in original post

oangodd
Level: Powered On

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

Thanks, that works. 

aprildunnam
Level 10

Re: How to Use CountIf With Filter to Get All Data Matching A Specific String In an Excel Field

You're welcome, glad I could help!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,455)