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 Gallery based o...
Power Apps
Unanswered

Filter Gallery based on blank Dropdown Month and Year

(0) ShareShare
ReportReport
Posted on by 40

Hi All,

 

I have 2 dropdown called DrMonth and DrYear and Items for both each dropdown as shown below

 

DrMonth

Items = Sequence(12,1,1)

DrYear

Items = Sequence(12,Year(Now()) - 0,1)

 

Now, I have Sharepoint list column called 'Induction Date' and type is Date & Time.

I have filter my gallery with below code which is working as I expected and I can retrieved the records based on Month or Year I have selected.

but now,  I need to achieved default both dropdown are blank and on Gallery will retrieved all records from SharePoint list.

 

Code

Sort(
 Filter(
 'IT Induction SEA',
 'Induction Date' >= Date(
 DrYear.Selected.Value,
 DrMonth.Selected.Value,
 1
 ) And 'Induction Date' < DateAdd(
 Date(
 DrYear.Selected.Value,
 DrMonth.Selected.Value,
 1
 ),
 1,
 Months
 )
 ),
 'Induction Date',
 Descending
)

 

Thanks 

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Am4ree ,

     

    Try the following code,

    Sort(
     Filter(
     'IT Induction SEA',
     ( IsBlank(DrYear.Selected) || IsEmpty(DrYear.SelectedItems) || 'Induction Date' >= Date(
     DrYear.Selected.Value,
     DrMonth.Selected.Value,
     1
     )) And 
     ( IsBlank(DrYear.Selected) || IsEmpty(DrYear.SelectedItems) || 'Induction Date' < DateAdd(
     Date(
     DrYear.Selected.Value,
     DrMonth.Selected.Value,
     1
     ),
     1,
     Months
     ))
     ),
     'Induction Date',
     Descending
    )

     

    Hope this helps

  • Am4ree Profile Picture
    40 on at

    Hi @Ethan_R ,

     

    Thank you for your respond.

     

    Have tried your code, however the default drmonth is 1 and dryear is 2023 due i put items Sequence(12,1,1) on drmonth and Sequence(12,Year(Now()) - 0,1) for dryear. when the screen gallery showing all records from month 1 and 2023 year retrieved, what I need to modify on item drmonth and dryear to get blank value?

     

    Thanks

     

    What items i need to be add on drmonth and dryear?

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard