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 by month on my ...
Power Apps
Answered

Filter by month on my datastore fields contains data

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

 

I Search to filter my data gallery by month

 

- I have a CDS datastore with a field where a date of an events is store

- When user watch events i want he can view all event or view event group by month exemple march 2017

Categories:
  • Meneghino Profile Picture
    6,949 on at

    Hi @Anonymous

    You can use AddColumns to add the YearMonth column and then a Filter function to filter by the desired year-month combination.

     

    Something like this:

    Filter(AddColumns(MyCDSentity, "YearMonth", Text(Year(MyDateField))&"-"&Text(Month(MyDateField), "00")), YearMonth = "2017-03")
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I try to understand you re solution

     

    For moment i change my way

     

    - I use Datepicker for collect a date

    - i put the result of Datepicker into a textbox with (DatePicker.SelectedDate; DateTimeFormat.LongDate)

    - when i patch my form i collect text of date into my database ( i change datatype of my field)

    - In my gallery i create a searchbar where i search for date.text

    - then when i type march or march 2017 i see events

  • Meneghino Profile Picture
    6,949 on at

    Hi again @Anonymous, well done for your clever solution.

    In my example I assumed that you stored dates as dates and not as text.

    Actually storing dates as text is much better in many situations (especially to avoid time zone related problems), but in that case the best format is not LongDate but "yyyy-mm-dd", which is a worldwide standard. So today would be 2017-03-16 as text.

    You can then get the date in any format you want, for example like this:

    Text(DateValue("2017-03-16"), DateTimeFormat.LongDate)

    This is just a thought.

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 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard