Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Filter gallery on a button click



Can anyone please help me how to write thje formual for filtering a gallery on a button click? 




Impactful Individual
Impactful Individual

Well it depends on where you are getting your filter value to filter the gallery? 

Community Support
Community Support

Hi @Apaco89 ,

Can you share a bit more about your issue ?

What do you want to filter the gallery base on ?


You can set items property of the gallery to a variable .

I made a test.


Set Items property of the gallery to :


Set Onselect property of the button to :

UpdateContext({var1:Filter(CustomGallerySample,SampleHeading="Lorem ipsum 1")})



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

Hi, Thanks for your reply. I think this gives me an Idea. I am trying to create day number button for one week, when you click a day , data in the gallery should sort based on the selected date. -Apaco

@v-sheyu-msft How do you set the Items property of the gallery?

Helpful resources

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (31,011)