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

Group rows according to ID and counting the number of rows of each ID

I need my collection to look like this -

mozzerellagoril_0-1664848364585.png

 

but it currently looks like this in powerapps -

mozzerellagoril_1-1664848495337.png

It counts all of the rows regardless of cl_code. 

This is the current formula... 

 

ClearCollect(
Attendance,
DropColumns(
AddColumns(
GroupBy(c_signups,"cl_code","Signups"),
"No. of signups",CountRows(c_signups.cl_code)
),
"Signups"
)
);

 

Not sure how to fix it as I thought countrows would follow groupby 😕

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @mozzerellagoril ,

 

Maybe you could try the following formula:

 

ClearCollect(
    Attendance,
    DropColumns(
        AddColumns(
            GroupBy(c_signups,"cl_code","Signups"),
            "No. of signups",
            CountRows(ThisRecord.Signups)
        ),
        "Signups"
    )
)

 

vyujincuimsft_0-1664855706537.png

 

 

Best Regards,

Charlie Choi

View solution in original post

1 REPLY 1
v-yujincui-msft
Community Support
Community Support

Hi @mozzerellagoril ,

 

Maybe you could try the following formula:

 

ClearCollect(
    Attendance,
    DropColumns(
        AddColumns(
            GroupBy(c_signups,"cl_code","Signups"),
            "No. of signups",
            CountRows(ThisRecord.Signups)
        ),
        "Signups"
    )
)

 

vyujincuimsft_0-1664855706537.png

 

 

Best Regards,

Charlie Choi

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.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (2,666)