cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Count Gallery Selected Items that meet criteria

Hello,

 

I have a Gallery that contains data about error reports. The gallery data is called "Table3.'Error No1' , Table3.'Error No2'....etc

 

This data is displayed as "OK" if there is no error or "Error" if there is.

I would like a label to display the amount of errors in the selected gallery item.

 

For example:

Gallery1.Selected:

Error No1 = OK

Error No2 = OK

Error No3 = Error

Error No4 = Error

Error No5 = OK

 

Error Count = 2 Errors

 

Any help would be appreciated.

Kyle

 

1 ACCEPTED SOLUTION

Accepted Solutions
theapurva
Super User
Super User

I believe your datasource will be like this:
[{Title:"Error No 1",IsError:"Error"},{Title:"Error No 2",IsError:"No Error"},{Title:"Error No 3",IsError:"No Error"},{Title:"Error No 4",IsError:"Error"}]

 

Gallery will be as attached pic:


Add a label outside gallery and display the Count as below formula:

 

CountRows(Filter(Gallery.AllItems,Label.Text="Error"))

 

-----------------------------------------------------------------------------------
Liked My Solution? Click on the Thumbs Up below.
Did I answer your Question? Please Click Accept as Solution below

Want to Support me? Buy Me A Coffee

View solution in original post

2 REPLIES 2
theapurva
Super User
Super User

I believe your datasource will be like this:
[{Title:"Error No 1",IsError:"Error"},{Title:"Error No 2",IsError:"No Error"},{Title:"Error No 3",IsError:"No Error"},{Title:"Error No 4",IsError:"Error"}]

 

Gallery will be as attached pic:


Add a label outside gallery and display the Count as below formula:

 

CountRows(Filter(Gallery.AllItems,Label.Text="Error"))

 

-----------------------------------------------------------------------------------
Liked My Solution? Click on the Thumbs Up below.
Did I answer your Question? Please Click Accept as Solution below

Want to Support me? Buy Me A Coffee

Hi @theapurva 

 

I have Radio Button and textinput in gallery1.

knsrinath_0-1669298889004.png

Request you help me to count Gallery1 selected items only

 

Thanks & Regards

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,150)