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 User is Admin ...
Power Apps
Answered

CountIf User is Admin or One of the other users

(0) ShareShare
ReportReport
Posted on by 193

So based on help I have received over the past couple of days I wanted to have a numerical display to make it easy for my users to see how many items at each status they have logged to their name. I have written the following code based on how I filter my data in my gallery.

So what I believe should work, doesn't and in my head I am saying/reading the code I have written as:
If my user is in the Admin SharePoint list then count how many Not Started, In Progress, Dead Deal, Completed Deal entries are there total for ALL USERS and Total them up. Else if they are not a user in the Admin SharePoint list then count how many of each status they are listed on either as the Assigned To user or a Lead Member user ONLY.

If(!IsEmpty(Filter(Admin_LeadData,FullName=varUser)),
 CountIf(Lead_Data, Status.Value = "Not Started") & Char(10) &
 CountIf(Lead_Data, Status.Value = "In Progress") & Char(10) &
 CountIf(Lead_Data, Status.Value = "Dead Deal") & Char(10) &
 CountIf(Lead_Data, Status.Value = "Completed Deal") & Char(10) &
 Sum(colDash_StatusTrack, Count),
 Filter(Lead_Data, AssignedTo.Value = varUser || LeadMember1.Value = varUser || LeadMember2.Value = varUser || LeadMember3.Value = varUser || LeadMember4.Value = varUser));

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @KimberlyM 

    Hi there Kim.  I was wondering if you had considered using the GroupBy function.  It sounds like it would be a great fit for your case.  GroupBy could SUM the results set of Filter(Admin_LeadData,FullName=varUser) by status.  There are some examples in the PowerApps documentation under "Aggregate results".

     

    I tried to find a video that was directly applicable to your siutation but could not.  However, I feel Audrie Gordon's video gives a good general intro https://www.youtube.com/watch?v=70tEP0ZAmsM

     

    ---

    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly.  If your thought the post was helpful please give it a "Thumbs Up."

     

     

  • KimberlyM Profile Picture
    193 on at

    Thank you. I am looking into this to see how it will best work for me with what I have done already. 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard