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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard