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 / How to filter my galle...
Power Apps
Answered

How to filter my gallery list to the current month and also filter by the current user?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hiii everyone,

 

I am new to powerapps and im having trouble with the filtering part. I want to filter my gallery list based on the claim type(All,Transportation,Phone Bill, Medical) as button click and I want it to display the claim request of the current month and also by the current user when i click on each of the claim type button click. I have successfully filtered the gallery list based on the claim type using update context on each button on the onselect property but im having problem in filtering it to the current month and by the current user. I have attached the neccesary screenshot with the formulas. Apparently, the filtering work fine for the Transportation, Phone Bill and Medical but not in All. How do I get this work? All help will be really appreciated.

1.PNG
2.PNG
3.PNG
Categories:
I have the same question (0)
  • K-A-R-L Profile Picture
    715 on at

    Hi @Anonymous ,

    You probably need to set up a global variable for the current month and the user profile on the App Property:

    On App Property:

    Set(CurrentMonth, Text( Now(), "[$-en-US]mmmm" )); //Makes current Month  a global variable
    Set(
    MyProfileDisplayName,
    Office365Users.MyProfile().DisplayName
    ) //Makes current user profile a global variable

    On your Gallery Items: (Just try to play with the codes below)

    Filter('Enfrasys Claims', Month = CurrentMonth &&  CreatedBy.DisplayName = MyProfileDisplayName &&  ClaimType.Value =varSelection)

    Cheers


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

    I just had to change the formula in the gallery item property and it works fine now. 

     

    I manage to modify the formula to this: 

    If(varSelection="All",Sort(Filter('Enfrasys Claims',Month(ClaimDate)=Month(Now()),CreatedBy.DisplayName=User().FullName),Description),Sort(Filter(Filter(Filter('Enfrasys Claims',Month(ClaimDate)=Month(Now())),CreatedBy.DisplayName=User().FullName),ClaimType.Value=varSelection),Description))

    Finally the filtering works.  Thank you for the assist.

  • genarich Profile Picture
    318 on at

    I have tried your solution but it is throwing me a delegation warning. More so, it is throwing the current month regardless of the current year. For example, it throws all years ie Aug 2019, 2020, 2021. If you could help me with this, it would be really great!

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard