web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter my Gallery by C...
Power Apps
Unanswered

Filter my Gallery by Current Month

(0) ShareShare
ReportReport
Posted on by 277

Hi guys,

 

I have a gallery view that contains record from a sharepoint list, in that one there is a field called MBirth, this is a single line text, so How can I filter my list that field? I mean, myfiel being equal to current month.

 

This is the expression that I'm trying to use:
Filter('Birthday and Work Anniversary','Birthday and Work Anniversary'.MBirth = Month(Now))

 

But it's not working.

 

This is an expression that I have in my workflow and working perfect, so if I could convert it to use in powerapps it would be great.

Query filter:
MBirth eq 'fomatDateTime(utcNow(),'MM')'

 

So, if my record is set to MBirth eq 04 and that's expression return 04, I'll well get all the records.

 

Could you help me with this?

 

Thank you so much,

 

Thanks in advance,

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @ADumith ,

    Try this

    Filter(
     'Birthday and Work Anniversary',
     MBirth = Text(Month(Now)),"MM")
    )

     

    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.

    Visit my blog Practical Power Apps

  • ADumith Profile Picture
    277 on at

    Thank you, 

     

    That function doesn't work for me because after placing it I got this warning:
    The filter may not work on large data sets.

    How ever, someone suggested me to create a variable for the month and then create a collection and put that collection as data source in my gallery.

     

    So I did this, in the Screen OnStart method I set this:
    Set(varMonths, Text(Today(),"mm"));
    ClearCollect(colBirthDayWorkAnniversary,Filter(EmployeesDirectory,Mbirth=varMonths))

     

    Then in the gallery DATA property I put what I understand would be the name of the collection, I mean, colBirthDayWorkAnniversary

     

    When I run the apps no record is shown in the gallery. Am I skipping a step?

     

    What's your opinion about it?

     

    Thanks in advance,

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @ADumith ,

    You are correct in that the code is not Delegable, but neither was what you posted so I assumed this was not an issue for you. If you want a Delegable filter

    With(
     {wNow: Text(Month(Now)),"MM")},
     Filter(
     'Birthday and Work Anniversary',
     MBirth = wNow
     )
    )

     

    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.

    Visit my blog Practical Power Apps

  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @ADumith ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

    Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard