Hi - I have a gallery that is filtered by and I want to then count how many of the rows have a status of Open and Closed - which are in a text field. The gallery will never be larger than 60 records; however, when I filter the gallery the CountIf and CountRows sometimes have the incorrect count, unless I scroll the vertical bar on the gallery.
For example, I have tried CountIf(Gallery.AllItems, Status = "Closed") and CountRows(Filter(Gallery.AllItems, Status = "Closed")).
Is there a way to refresh counts or the gallery or something - this seems like a very simple operation especially since the rows are always 60 or less. Thanks in advance for any help.
By definition the Gallery is a paged view that only shows the first 100 records. But if the gallery will never have more than 60 records then CountRows() should work fine. Is Status a choice field? if so you might need to use Status.Value = "Closed" or filter based on the value of the control in the gallery instead of the field. Like this
CountRows(Filter(Gallery1.AllItems,Label3.Text = "Closed"))
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT