Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

ShowAll Gallery Filter Btn


I created these filter btns: New | Pending | Completed

Each one of them filters the gallery and show the corresponding item(s)

All the filter btns are set to variables Set(varFilter,"New") | Set(varFilter,"Pending") | Set(varFilter,"Completed")


1. How do I set the Show All tab to show all the (New, Pending & Completed) items.

Note: when I log in afresh, it shows all the items but after clicking on the New, Pending & Completed tab, I need to find a way to return all of them showing on the screen all again.


2. How do I code gallery count for each tab selected? Say for instance, if there are just 2 New items, 3 Pending Items and 4 Completed items respectively, when I click on the New, I should see a label by the side showing the total number of item selected.

Onload of the screen, all the items show




Accepted Solutions

Try something like:


TextSearchBox1_1.Text in Recipe || TextSearchBox1_1.Text in 'Batch No' || TextSearchBox1_1.Text in Date || TextSearchBox1_1.Text in Operator
If(varFilter = "All",'MyDataSource', Filter('MyDataSource', 'Slury Status'.Value = varFilter))


View solution in original post

Solution Sage
Solution Sage

Hi @Virikefe22 ,


Please share a gallery items code with us for the ShowAll issue.

Regarding the gallery count use the following:



Resolver I
Resolver I

If I understood , you want show all items what mean no filtering.

in show all button you can do like this: Set(varFilter,"All")


in gallery items (believe you are filtering by varFilter) you need to test


If(varFilter = "All", Datasource, Filter(Datasouce, Status = varFilter))


Helper V
Helper V

Thanks @Gochix ,

I don't understand what you mean by "gallery items code".

For the other btns (New, Pending and Completed, I used these to filter: 

Set(varFilter,"New") | Set(varFilter,"Pending") | Set(varFilter,"Completed") and it's working for them.

Just the ShowAll that's the issue.


As for the CountRows... IT WORKED!!! Many thanks.

I applied it like this:

If(varFilter = "All", 'MyDataSource', Filter('MyDataSource', Status = varFilter))


But the last "=" on the line is showing error.

Hi @Virikefe22 ,



If(varFilter = "All", SPlist, Filter(SPList, status = varFilter))


status will be your column in your data source where status is stored as "New", "Pending" and "Completed"


I've checked the code at my end and the formula works. So if this doesn't work for you then you have to adjust it for your data source and column name.

If your status field is a choice field you need to put status.value

Not still working yet Bro @Ricardo_Costa  @Gochix 

What kind of error do you get from the last "=" ?

can you share the error message?

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,645)