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 / CountIf Logical with S...
Power Apps
Answered

CountIf Logical with Sharepoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I'm trying to create a textbox that says how many tasks are due/overdue. The data is stored in sharepoint, with the due date as a date and the completion status as a choice list. Right now it works if I only use the date to determine the number of tasks. However I need to only include assigned tasks so I need to add a second conditional to the formula. Right now I have it set up like so:

 

CountIf('Task Management',Value(Text(Due_Date, "[$-en-US]yyyymmdd")) < Value(Text(Today(), "[$-en-US]yyyymmdd")) && Status = First(Choices('Task Management'.Status)))

 

It stops working once I add the "&&" and everything past it. Does anyone have any advice?

 

Thanks, 

Categories:
  • WarrenBelz Profile Picture
    156,536 Most Valuable Professional on at

    Hi @Anonymous ,

    Your problem is here

    Status = First(Choices('Task Management'.Status)))

    Are you actually after the value chosen in the control?

    CountIf(
     'Task Management',
     DateDiff(
     Due_Date, 
     Today(), 
     Days
     )>0 &&
     Status = YourDropdownName.Selected.Status
    )

     

    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.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The dropdown menu with the choices is a field in the sharepoint, not a dropdown menu in the actual powerapp. But I was able to fiddle with it and get it to work.

     

    Thanks!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard