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

Count number of checked items within a gallery

Hello Everyone,

I'm trying to count the number of checked checkboxes by a category ( group by item ) and have the same result in a new column of the same gallery. 

example : 

in the red box is what I want to achieve 

I tried with the formula below but Im getting a circular reference error.

checked.png

 

Is there any was to achieve this please ? 

 

Thanks in advance 

5 REPLIES 5
Maceo
Frequent Visitor

Hi TOJMK,

 

In my opinion, if you want to use a formula with gallery. You can't directly use this in the gallery inside. Otherwise it will cause some direction mistake.

Maceo_0-1625043966836.png

 

Thanks,

Maceo

 

 

Maceo
Frequent Visitor

Solution in my thought:

1.Change the Oncheck&OnUncheck function for Checkbox, use a variable to store the number of checked.

 

Set(
    var1,CountRows(
    Filter(
        Gallery1.AllItems,
        Checkbox1.Value
    )
))

 

Maceo_2-1625046873689.png

 

 2.Use the variable for the text in Label

Maceo_3-1625047117269.png

 

Hope this can help you.

Thanks,

Maceo

 

TOJMK
Frequent Visitor

Hi Maceo

thank you for your reply, with the proposed solution I can not get the number of checked without group by. 

what I want to achieve is a count group by item  ( like the screenshot ITEM1 = 2 , ITEM2=0) 

Maceo
Frequent Visitor

Oh, probably I got what you mean, you want to show the total amount that checked in Item1 etc.

Is I correct? It will be a great challenge.

 

Thanks,

Maceo

TOJMK
Frequent Visitor

yes, any idea or solution for this topic?

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,365)