web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Iterate through existi...
Power Apps
Unanswered

Iterate through existing collection for id values required for new collection. Then group by distinct values and create percentage of adjacent column values

(0) ShareShare
ReportReport
Posted on by 131

 

I have an existing collection of group id's and plan id's and want to create a new collection record that uses these id's to create a percentage of completed tasks per plan.. This is to provide data for a progress chart next to each plan in a Gallery. As below

 

Capture.JPG

 

I have the following below for the existing collection:

 

Clear(MyGroupandPlansGalleryItems);
ForAll(
 RenameColumns(MicrosoftTeams.GetAllTeams().value, "id", "groupId"),
 Collect(MyGroupandPlansGalleryItems, AddColumns(Planner.ListGroupPlans(groupId).value,"groupname",displayName, "groupId", groupId))
);

 

Capture.JPG

 Which works great.

 

Problem:

As understand I need now to create a collection of tasks for each of these plans (which requires both group id and plan ids). I have tried the following:

 

Clear(MyGroupandPlansCompletedGalleryItems);
Collect(MyGroupandPlansCompletedGalleryItems, AddColumns(Planner.ListTasksV3(MyGroupandPlansGalleryItems.id, MyGroupandPlansGalleryItems.groupId).value));

 

Intention:

As mentioned at the beginning, I want to group by plan Id and show percentage of tasks that are completed. I was going to use the "percentComplete" values from task details to create that percentage of completed tasks per plan.

Record of individual tasks below:

percentCompleteplanId
0BGdKsoj4AUuCWxQRd5DHAmUAEh6b
0BGdKsoj4AUuCWxQRd5DHAmUAEh6b
50BGdKsoj4AUuCWxQRd5DHAmUAEh6b
50BGdKsoj4AUuCWxQRd5DHAmUAEh6b
100BGdKsoj4AUuCWxQRd5DHAmUAEh6b

 

Intention is to Group By plan Id and create percentage of "percentComplete" for chart image. Something like below:

 

taskspercentCompletedplanId
60BGdKsoj4AUuCWxQRd5DHAmUAEh6b
20HNI2WZ3F7kWlP8XXh-SiImUACDfO

 

I intend to apply what I learn here to do the same by bucketid and appliedCategories.

Any help would be appreciated!

Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard