cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KyleJackDaniel1
Frequent Visitor

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 REPLY 1
theapurva
Responsive Resident
Responsive Resident

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"))

 

----------------------------------------------------------------------------------------------------------------------
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,946)