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 / filter with multiple c...
Power Apps
Answered

filter with multiple criteria

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have this current formula, which works fine.

Sum(Filter('Approved Requests RF',Employee = User().FullName),'Total Number of Hours')&" hours"

 

I need to change the source to 'Leave Requests RF', change Employee to Employee Name and add in a new criteria of Status = "Approved".  I have tried this, but it doesnt work.  Any help?

 

Sum(Filter('Leave Requests RF',Employee Name = User().FullName && Status = "Approved"),'Total Number of Hours')&" hours"

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Hi @Anonymous,

    if Status is a lookup or choice column in SharePoint, then you need to add .Value to it 

    Sum(Filter('Leave Requests RF',Employee Name = User().FullName 
    && Status.Value = "Approved"),'Total Number of Hours')&" hours"

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your help @Drrickryp

     

    @Anonymous can you let us know if this solves your issue?

     

    @Anonymous

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,  Unfortunately this is still not working.

     

    I did also need to change a column header, and I have done so but it does not work.

     

    This is what I now have, and i get a white cross in a red circle.

     

    Sum(Filter('Leave Requests RF',Employee Name = User().FullName && Status.Value = "Approved"),'Total Number of Hours Requested')&" hours"

     

    If I put apostrophes around Employee Name, it then changes to a yellow triangle.

     

    Apologies for the delay, this is a bit of a side prohect for me, and workload is high at the moment.

     

    Rick

  • panand99 Profile Picture
    641 on at

    Hi,

     

    1) Yellow triangle is coming for delegation warning, you have to select collection instead of direct list name to solve this.

    2) User.().FullName returns user ful name in Capital letters, please check your Employee name from the list. 

    Use of Proper() will solve this type of issues.

     

    Please let us know whether these changes will solve your issue.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    HI,

     

    I have another text box with User().FullName  and this doesn't return the result in capitals.

     

    I'm not sure what you mean by selecting the collection.  Please can you advise.

     

    Rick

     

     

     

  • panand99 Profile Picture
    641 on at
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at
    Hi Rick, panand99 is telling you that if you create a collection from your datasource, ie. ClearCollect(leaverequests, 'Leave Requests RF') you can substitute the name of the collection leaverequests where ever you are using the datasource and you will be able to use all functions, not just delegatable ones in your app. You can put the ClearCollect(leaverequests, 'Leave Requests RF') in the OnVisible property of the screen so that the collection will be up to date and available if you make changes in your datasource.
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey Rickfear,

     

    So with the yellow triangle around the user name (delegation warning) this is because doing username=User().Email uses the User() function and I think the connectors have to process something or other and you get the delegation warning.

     

    Anyhow.

     

    If you store the current user in a variable (probably a global one called gloCurrentUserEmail - Set(gloCurrentUser,User().Eamil) this will store the users email for you for use anywhere in your app. Then simply send the vairable to sharepoint in your filter so Username=gloCurrentUserEmail.

     

    The other factor is having the user email address stored in a text field in sharepoint as the person field has a whole bunch of delegation issues.

     

    Hope this helps.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the advice everyone, but I still don't really understand what I am supposed to be doing.

    I think I need to spend a bit of time on it, and at the moment I don't have the time neccessary.

    Rick

  • PytByt Profile Picture
    943 on at

    Hi @Anonymous 

     

    have you solved your problem?

    if you have, what is the solution?

    i have similiar problem with yours, and i can really get some help.

     

    Regards,

    pytbyt

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard