cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

ClearCollect with Distinct and Concat

I need to create a collection from another collection that has 3 columns, Approver, Approver Email and Employees.

 

Approver and Approver Email need to be distinct (1 instance of Approver along with their email address) and employees needs to be a concatted column of all the employee display names that belong to the manager.

 

I am not quite sure how to build the ClearCollect statement to accomplish this.

 

I have this much

 

ClearCollect(Managers, Distinct(RequestInnput, Approver))

 

Where do I go from here or is this even possible?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @JR-BejeweledOne ,

Try:

 

ClearCollect( 
         Managers,
         DropColumns(
               AddColumns(
                   GroupBy(RequestInput,"Approver","Approver Email","Result"),
                   "Employees",
                   Concat(Result,Employees&";")
               ),
               "Result"
)

 

 

Hope it helps !

View solution in original post

1 REPLY 1
gabibalaban
Super User II
Super User II

Hi @JR-BejeweledOne ,

Try:

 

ClearCollect( 
         Managers,
         DropColumns(
               AddColumns(
                   GroupBy(RequestInput,"Approver","Approver Email","Result"),
                   "Employees",
                   Concat(Result,Employees&";")
               ),
               "Result"
)

 

 

Hope it helps !

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,311)