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 / Count values in column...
Power Apps
Answered

Count values in column if person matches

(0) ShareShare
ReportReport
Posted on by 138

Hi 

 

I'm making a holiday request tool and would like to add a way for the user to see the total number of holidays they have taken. 

 

I have a label on my power app which shows the current logged in user:

Label 5.Text = Office365Users.MyProfileV2().displayName

 

My app is linked with a sharepoint list titled "Holiday Request Tool." I would like to add another label to my app, which looks through the sharepoint entries to find all entries which match the Label5 in the "EID" column, then adds together all of the values in the "Number Of Days" column. Screenshot attached of my Sharepoint list. The screenshot shows 2 requests from the same person for 6 days and 8 days holiday, so I would like the label in my app to return 14. 

Can anyone help me do this please?

 

Thanks, Screenshot 2023-06-23 at 20.01.58.png

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @stephenjcarr 

    This should give you the result that you're looking for:

    Sum(Filter('Holiday Request Tool',
     EID=Label5.Text),
     'Number Of Days'
    )
  • stephenjcarr Profile Picture
    138 on at

    Hey @timl thanks for your reply! 

    This code doesnt give me any errors (other than a delegation warning), but the label is still blank. Do you have any ideas why this might be?

    Thanks, 

  • stephenjcarr Profile Picture
    138 on at

    Never Mind @timl - Found the problem! 

    Sum(Filter('Holiday Request Tool',
    EID.DisplayName=Label5.Text),
    'Number Of Days'
    )
    Thanks again! 

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