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 / Filtering by month and...
Power Apps
Answered

Filtering by month and year

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

I am looking to create a gallery which can be filtered (perhaps using dropdown options) in 4 ways:

1. by user

2. by whether the task on the list is complete

3. by any given month; and

4. by the year

 

So, if I want to see how many tasks were completed by user Joe Bloggs in June 2020 I could do this.

 

But, when the list itself contains full dates (e.g. 12/6/2020 etc) how can I group these into a month?

 

I hope that makes sense.

 

Thanks

Categories:
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @JohnC2 ,

    For Filter the Full based on Month you can use like below.

    VijayTailor_0-1602255851092.pngVijayTailor_1-1602255887865.png

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

     

  • JohnC2 Profile Picture
    2 on at

    Thanks Vijay, However, doesn't this effectively "hard code" the given month into the app?

     

    I would need the flexibility to look at any month within any year on the list.

     

    John 

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @JohnC2 ,

    that I mentioned just to show you the example, but you can pass the value as your required like from drop-down or any other way.

    Filter(TestAkshay,Text(DateField,"[$-en-US]mmm")=Text(ComboBox12.Selected.DateField,"[$-en-US]mmm"))

    VijayTailor_0-1602257748012.png

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @JohnC2 ,

     

    Try to add two new columns to store Month and Year of the full date, then filter by the new columns.

    Filter(AddColumns('list name', "Month", Month('Full Date Column'), "Year",Year("Full Date Column")), Month=MonthDropDown.Selected.Value && Year=YearDropDown.Selected.Value)

    Hope this helps.

    Sik

  • JoshPeralta Profile Picture
    2 on at

    This is Working. But there is still delegation warning. 

    How can we remove that?

  • vmarlir Profile Picture
    Microsoft Employee on at

    I found a way.

    - First day:  set a Date(year, month, day) with month and year dropdown's value. The "1" hardcoded represent the day.

     

    Date(yearRangeDate.Selected.Value, monthRangeDate.Selected.Value, 1)

     

     

    Last day: Copy the first day formula, and sum 1 month. After that subtract 1 day

     

    DateAdd(DateAdd(Date(yearRangeDate.Selected.Value, monthRangeDate.Selected.Value, 1), 1, TimeUnit.Months), -1, TimeUnit.Days)

     

    Full example of a filter:

     

    Filter(
     listName,
     Date >= Date(yearRangeDate.Selected.Value, monthRangeDate.Selected.Value, 1),
     Date <= DateAdd(DateAdd(Date(yearRangeDate.Selected.Value, monthRangeDate.Selected.Value, 1), 1, TimeUnit.Months), -1, TimeUnit.Days)
    )

     

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard