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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,952)