web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps - Using Coun...
Power Apps
Unanswered

PowerApps - Using CountIf on a column of dates to find text

(0) ShareShare
ReportReport
Posted on by 46

Hi,

 

It might be that I just have to tidy up my spreadsheet. I have a list of dates that is 90% dates and 10% text in my RegClinicDate column. If a patient books a clinic, I put a date; if they don't I put No Response; if I am still waiting, I put a dash "-".

 

I'm trying to count patients who we are waiting for and am using this formula:

 

CountIf(PatientTable,RegClinicDate="-")

 

But I get an error message saying Data Type: Number

 

Thanks in advance

Categories:
I have the same question (0)
  • theapurva Profile Picture
    970 Super User 2024 Season 1 on at

    Hello @RyanParker ,

    where do you get this error?
    if you put this formula as text property of label,

    there should not be any issue.

  • RyanParker Profile Picture
    46 on at

    I'm getting a yellow explanation point saying DateTime and Text can't be compared. The result is also 0 but I should have 17. I think I have to put Text() in there somewhere but I'm not getting far

  • theapurva Profile Picture
    970 Super User 2024 Season 1 on at

    You will be able to put '-' and 'No Response' only if RegClinicDate is of type single line of text.

  • RyanParker Profile Picture
    46 on at

    That doesn't work either I'm afraid. My column is a mix of dates and text. I might just separate the column instead

  • theapurva Profile Picture
    970 Super User 2024 Season 1 on at

    Not sure how would your RegClinicDate column accepts non-date values.
    what is the datasource of your List? is it SharePoint?

  • Verified answer
    uwenagel Profile Picture
    382 on at

    You should be successful by changing your formula as follows:

     

    CountIf(PatientTable,Text(RegClinicDate)="-")

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

    If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard