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
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 (4,025)