cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
heydamianards
Frequent Visitor

Filter Browse Gallery using Date Picker & Filter Gallery

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.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

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-Picke...

 

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

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
v-xida-msft
Community Support
Community Support

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-Picke...

 

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

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,091)