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 Browse Gallery ...
Power Apps
Answered

Filter Browse Gallery using Date Picker & Filter Gallery

(0) ShareShare
ReportReport
Posted on by 29

Hi All,

 

I would like to know if its possible to combine 2 formulas for the browse gallery.

1. Filter Gallery act as a filter for status.

2. Date Picker act as a date filter.

 

My formula for the Filter Gallery:

If(ThisItem.Title="Active",UpdateContext({type:"Active"}),If(ThisItem.Title="Pending",UpdateContext({type:"Pending"}),If(ThisItem.Title="Acknowledged",UpdateContext({type:"Acknowledged"}),If(ThisItem.Title="Resolved",UpdateContext({type:"Resolved"}),If(ThisItem.Title="Overall Alerts",UpdateContext({type:"Overall Alerts"}))))))

 

My formula for the Browse Gallery:

If(type="Overall Alerts", 'MS Teams Alerts', If(FilterGallery.Selected.TextBox1.Text="Active",Filter('MS Teams Alerts',type in Status),If(FilterGallery.Selected.TextBox1.Text="Pending",Filter('MS Teams Alerts',type in 'Admin Status'),If(FilterGallery.Selected.TextBox1.Text="Acknowledged",Filter('MS Teams Alerts',type in 'Admin Status'),If(FilterGallery.Selected.TextBox1.Text="Resolved",Filter('MS Teams Alerts',type in Status))))))

 

I would like to include this formula: 

Filter('MS Teams Alerts',Text('Date Received', "[$-en-US]mm-dd-yyyy")=Text(DatePicker1.SelectedDate, "[$-en-US]mm-dd-yyyy"))

 

For me to see my data per date and per status. Thank you.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @heydamianards 

    I'm not entirely sure why all the context variables in your formulas, but you can get rid of them and try changing your formula for the Browse Gallery to the following:

    Filter(
     'MS Teams Alerts', 
     FilterGallery.Selected.Title in Status 
     && 'Date Received' = DatePicker1.SelectedDate
     )

    If your 'Date Received' contains time information, then you can utilize either the Text function that you had, or the Date function to compare date to date.  Something like this:

    Filter(
     'MS Teams Alerts', 
     FilterGallery.Selected.Title in Status 
     && Date(Year('Date Received'), Month('Date Received'), Day('Date Received) = DatePicker1.SelectedDate
     )

    -or-

    Filter(
     'MS Teams Alerts', 
     FilterGallery.Selected.Title in Status 
     && Text('Date Received', ShortDate) = Text(DatePicker1.SelectedDate, ShortDate)
     )

     

    I hope this is helpful for you.

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

    Hi @heydamianards ,

    I found that you have posted same thread in current forum already, please check my response within the following thread:

    https://powerusers.microsoft.com/t5/Power-Apps-Governance-and/Filter-Browse-Gallery-using-Date-Picker-amp-Filter-Gallery/m-p/496066

     

    If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

     

    Best regards,

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

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard