Skip to main content
Community site session details

Community site session details

Session Id : hC1IHPPIjT5C5jpgGPQxzl
Power Apps - Building Power Apps
Unanswered

How to create a count or countif based on specific keywords in a gallery?

Like (0) ShareShare
ReportReport
Posted on 4 May 2021 18:33:14 by 54

So I am trying to create a quiz grading system and there are few different types of errors.

 

I am marking errors in a form field that is then added to a gallery that represents the total errors in a collection.

 

I want to now figure out how to represent the different type of errors in this collection as a score, i.e. how many errors did this person get?

 

In other words, i want my quiz to generate a score, but i am unsure as to how to represent that since there are different types of errors that are worth different amounts of points. 

 

does anyone have any tips or advice?

 

Categories:
  • Wayne_A Profile Picture
    113 on 04 May 2021 at 19:07:03
    Re: How to create a count or countif based on specific keywords in a gallery?

    Wayne_A_0-1620155079941.png

    Do you mean where the same field in the gallery could hold differing values?

    The above was done with the simple expression:
    CountIf(Gallery1.AllItems,SampleHeading="Lorem ipsum 1")+CountIf(Gallery1.AllItems,SampleHeading="Lorem ipsum 2")

    but if you needed a weighting then I suppose you could do something like:
    (CountIf(Gallery1.AllItems,SampleHeading="Lorem ipsum 1")*10)+(CountIf(Gallery1.AllItems,SampleHeading="Lorem ipsum 2")*20)

    Would this work for your scenario?


    Like it? please click the Thumbs Up button!
    Problem Solved? please click the Accept as Solution button to help other Community members find the answer as well!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete